summaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Readers/Org/Inlines.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Text/Pandoc/Readers/Org/Inlines.hs')
-rw-r--r--src/Text/Pandoc/Readers/Org/Inlines.hs12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/Text/Pandoc/Readers/Org/Inlines.hs b/src/Text/Pandoc/Readers/Org/Inlines.hs
index fdefd2a3f..001aeb569 100644
--- a/src/Text/Pandoc/Readers/Org/Inlines.hs
+++ b/src/Text/Pandoc/Readers/Org/Inlines.hs
@@ -728,8 +728,12 @@ smart = do
doubleQuoted <|> singleQuoted <|>
choice (map (return <$>) [orgApostrophe, orgDash, orgEllipses])
where
- orgDash = dash <* updatePositions '-'
- orgEllipses = ellipses <* updatePositions '.'
+ orgDash = do
+ guard =<< getExportSetting exportSpecialStrings
+ dash <* updatePositions '-'
+ orgEllipses = do
+ guard =<< getExportSetting exportSpecialStrings
+ ellipses <* updatePositions '.'
orgApostrophe =
(char '\'' <|> char '\8217') <* updateLastPreCharPos
<* updateLastForbiddenCharPos
@@ -737,7 +741,7 @@ smart = do
singleQuoted :: OrgParser (F Inlines)
singleQuoted = try $ do
- guard . exportSmartQuotes . orgStateExportSettings =<< getState
+ guard =<< getExportSetting exportSmartQuotes
singleQuoteStart
updatePositions '\''
withQuoteContext InSingleQuote $
@@ -749,7 +753,7 @@ singleQuoted = try $ do
-- in the same paragraph.
doubleQuoted :: OrgParser (F Inlines)
doubleQuoted = try $ do
- guard . exportSmartQuotes . orgStateExportSettings =<< getState
+ guard =<< getExportSetting exportSmartQuotes
doubleQuoteStart
updatePositions '"'
contents <- mconcat <$> many (try $ notFollowedBy doubleQuoteEnd >> inline)