From 209ea32c6a2f5a59024e0cadb97e93e637c74714 Mon Sep 17 00:00:00 2001
From: Alice BRENON <alice.brenon@ens-lyon.fr>
Date: Thu, 3 Apr 2025 01:03:53 +0200
Subject: [PATCH] Apply a fix similar to c4e7d5e8 on the filter generating the
 glossary to make sure single quotes are not mistreated

---
 filter/with-glossary.hs | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/filter/with-glossary.hs b/filter/with-glossary.hs
index 452d0db..7518f2f 100644
--- a/filter/with-glossary.hs
+++ b/filter/with-glossary.hs
@@ -14,6 +14,7 @@ import System.FilePath ((</>), (<.>))
 import Text.Pandoc
   ( Block(..), Format(..), Inline(..), Meta(..), Pandoc(..), ReaderOptions(..)
   , lookupMeta, nullAttr, pandocExtensions, readMarkdown, runIOorExplode )
+import Text.Pandoc.Extensions (Extension(..), disableExtension)
 import Text.Pandoc.JSON (ToJSONFilter(..))
 import Text.Pandoc.Walk (query, walkM)
 import Text.Printf (printf)
@@ -83,7 +84,8 @@ loadDef headword _ = do
     definitionPath = ((</> unpack headword <.> "md") . root)
     getDocument path =
       liftIO (Text.readFile path >>= runIOorExplode . readMarkdown options)
-    options = def { readerExtensions = pandocExtensions }
+    options =
+      def { readerExtensions = disableExtension Ext_smart pandocExtensions }
     empty = Entry {headword = "", definition = []}
     store = modify . insert (Text.toLower headword)
 
-- 
GitLab