Org reader: allow emphasized text to be followed by `[`
Closes: #3577
commit464db59394e5ff0e366e1dab40c3edbf7ea32dac
authorAlbert Krewinkel <albert@zeitkraut.de>
dateSun 16 Apr 2017, 21:19 (10 years ago)
parent1c8683f
src/Text/Pandoc/Readers/Org/Inlines.hs+1−1
@@ -731,7 +731,7 @@ emphasisPreChars = "\t \"'({"
731731
732732-- | Chars allowed at after emphasis
733733emphasisPostChars :: [Char]
734−emphasisPostChars = "\t\n !\"'),-.:;?\\}"
734+emphasisPostChars = "\t\n !\"'),-.:;?\\}["
735735
736736-- | Chars not allowed at the (inner) border of emphasis
737737emphasisForbiddenBorderChars :: [Char]
test/Tests/Readers/Org.hs+10
@@ -1028,6 +1028,16 @@ tests =
10281028 , note $ para ("Second" <> space <> "note.")
10291029 ])
10301030
1031+ , "Emphasized text before footnote" =:
1032+ unlines [ "/text/[fn:1]"
1033+ , ""
1034+ , "[fn:1] unicorn"
1035+ ] =?>
1036+ para (mconcat
1037+ [ emph "text"
1038+ , note . para $ "unicorn"
1039+ ])
1040+
10311041 , "Footnote that starts with emphasized text" =:
10321042 unlines [ "text[fn:1]"
10331043 , ""