summaryrefslogtreecommitdiff
path: root/tests/Tests
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 /tests/Tests
parentda056191182777c4e4e951d3aae49c6428677fc7 (diff)
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 'tests/Tests')
-rw-r--r--tests/Tests/Readers/Org.hs11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/Tests/Readers/Org.hs b/tests/Tests/Readers/Org.hs
index 66f284b28..05d206d85 100644
--- a/tests/Tests/Readers/Org.hs
+++ b/tests/Tests/Readers/Org.hs
@@ -539,6 +539,17 @@ tests =
"* This: is not: tagged" =?>
headerWith ("this-is-not-tagged", [], []) 1 "This: is not: tagged"
+ , "Header starting with strokeout text" =:
+ unlines [ "foo"
+ , ""
+ , "* +thing+ other thing"
+ ] =?>
+ mconcat [ para "foo"
+ , headerWith ("thing-other-thing", [], [])
+ 1
+ ((strikeout "thing") <> " other thing")
+ ]
+
, "Comment Trees" =:
unlines [ "* COMMENT A comment tree"
, " Not much going on here"