@@ -29,6 +29,7 @@ Define the Org-mode parser state.
2929-}
3030module Text.Pandoc.Readers.Org.ParserState
3131 ( OrgParserState (..)
32+ , defaultOrgParserState
3233 , OrgParserLocal (..)
3334 , OrgNoteRecord
3435 , HasReaderOptions (..)
@@ -104,6 +105,11 @@ type TodoSequence = [TodoMarker]
104105data OrgParserState = OrgParserState
105106 { orgStateAnchorIds :: [String]
106107 , orgStateEmphasisCharStack :: [Char]
108+ , orgStateEmphasisPreChars :: [Char] -- ^ Chars allowed to occur before
109+ -- emphasis; spaces and newlines are
110+ -- always ok in addition to what is
111+ -- specified here.
112+ , orgStateEmphasisPostChars :: [Char] -- ^ Chars allowed at after emphasis
107113 , orgStateEmphasisNewlines :: Maybe Int
108114 , orgStateExportSettings :: ExportSettings
109115 , orgStateHeaderMap :: M.Map Inlines String
@@ -124,7 +130,9 @@ data OrgParserState = OrgParserState
124130 , orgMacros :: M.Map Text Macro
125131 }
126132
127−data OrgParserLocal = OrgParserLocal { orgLocalQuoteContext :: QuoteContext }
133+data OrgParserLocal = OrgParserLocal
134+ { orgLocalQuoteContext :: QuoteContext
135+ }
128136
129137instance Default OrgParserLocal where
130138 def = OrgParserLocal NoQuote
@@ -168,6 +176,8 @@ instance Default OrgParserState where
168176defaultOrgParserState :: OrgParserState
169177defaultOrgParserState = OrgParserState
170178 { orgStateAnchorIds = []
179+ , orgStateEmphasisPreChars = "-\t ('\"{"
180+ , orgStateEmphasisPostChars = "-\t\n .,:!?;'\")}["
171181 , orgStateEmphasisCharStack = []
172182 , orgStateEmphasisNewlines = Nothing
173183 , orgStateExportSettings = def