aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc
diff options
context:
space:
mode:
authorAlbert Krewinkel <albert@zeitkraut.de>2015-11-08 22:23:47 +0100
committerAlbert Krewinkel <albert@zeitkraut.de>2015-11-08 22:32:00 +0100
commite3b4844bd77ef2cc0a288c0b5378e2569468c618 (patch)
treef0eff263a414c3ef5c22fef7ac5603b82ffbf00d /src/Text/Pandoc
parentda056191182777c4e4e951d3aae49c6428677fc7 (diff)
downloadpandoc-e3b4844bd77ef2cc0a288c0b5378e2569468c618.tar.gz
Org reader: fix markup parsing in headers
Markup as the very first item in a header wasn't recognized. This was caused by an incorrect parser state: positions at which inline markup can start need to be marked explicitly by changing the parser state. This wasn't done for headers. The proper function to update the state is now called at the beginning of the header parser, fixing this issue. This fixes #2504.
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r--src/Text/Pandoc/Readers/Org.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Readers/Org.hs b/src/Text/Pandoc/Readers/Org.hs
index 2585ace21..90bc48b22 100644
--- a/src/Text/Pandoc/Readers/Org.hs
+++ b/src/Text/Pandoc/Readers/Org.hs
@@ -730,7 +730,7 @@ headerTags = try $
headerStart :: OrgParser Int
headerStart = try $
- (length <$> many1 (char '*')) <* many1 (char ' ')
+ (length <$> many1 (char '*')) <* many1 (char ' ') <* updateLastPreCharPos
-- Don't use (or need) the reader wrapper here, we want hline to be