git.iko.soy/typeable/pandoc
on master help sign in
Org reader: allow emphasized text to be followed by `[`
464db59Albert Krewinkel
src/Text/Pandoc/Readers/Org/Inlines.hs+1−1
@@ -731,7 +731,7 @@ emphasisPreChars = "\t \"'({"
731
731
732-- | Chars allowed at after emphasis
732-- | Chars allowed at after emphasis
733emphasisPostChars :: [Char]
733emphasisPostChars :: [Char]
734−emphasisPostChars = "\t\n !\"'),-.:;?\\}"
734+emphasisPostChars = "\t\n !\"'),-.:;?\\}["
735
735
736-- | Chars not allowed at the (inner) border of emphasis
736-- | Chars not allowed at the (inner) border of emphasis
737emphasisForbiddenBorderChars :: [Char]
737emphasisForbiddenBorderChars :: [Char]
test/Tests/Readers/Org.hs+10
@@ -1028,6 +1028,16 @@ tests =
1028 , note $ para ("Second" <> space <> "note.")
1028 , note $ para ("Second" <> space <> "note.")
1029 ])
1029 ])
1030
1030
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+
1031 , "Footnote that starts with emphasized text" =:
1041 , "Footnote that starts with emphasized text" =:
1032 unlines [ "text[fn:1]"
1042 unlines [ "text[fn:1]"
1033 , ""
1043 , ""