aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlbert Krewinkel <[email protected]>2025-07-24 11:27:12 +0200
committerJohn MacFarlane <[email protected]>2025-08-06 12:54:12 -0700
commit90afbea1db63dd0b84a17fdd5702dc43107725d8 (patch)
tree1730fedbd9727bc8d801ecfc2d08e0ecb0995b92 /src
parentb24bba7a20b1d40b4b9de71015e29fa535a395f3 (diff)
Org writer: disable smart quotes by default
Diffstat (limited to 'src')
-rw-r--r--src/Text/Pandoc/Writers/Org.hs12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Writers/Org.hs b/src/Text/Pandoc/Writers/Org.hs
index 8def0cf8b..6c05467cb 100644
--- a/src/Text/Pandoc/Writers/Org.hs
+++ b/src/Text/Pandoc/Writers/Org.hs
@@ -496,10 +496,18 @@ inlineToOrg (Subscript lst) = do
inlineToOrg (SmallCaps lst) = inlineListToOrg lst
inlineToOrg (Quoted SingleQuote lst) = do
contents <- inlineListToOrg lst
- return $ "'" <> contents <> "'"
+ opts <- gets stOptions
+ return $
+ if isEnabled Ext_smart opts || isEnabled Ext_smart_quotes opts
+ then "'" <> contents <> "'"
+ else "‘" <> contents <> "’"
inlineToOrg (Quoted DoubleQuote lst) = do
contents <- inlineListToOrg lst
- return $ "\"" <> contents <> "\""
+ opts <- gets stOptions
+ return $
+ if isEnabled Ext_smart opts || isEnabled Ext_smart_quotes opts
+ then "\"" <> contents <> "\""
+ else "“" <> contents <> "”"
inlineToOrg (Cite cs lst) = do
opts <- gets stOptions
if isEnabled Ext_citations opts