diff options
author | John MacFarlane <jgm@berkeley.edu> | 2014-04-09 09:34:44 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2014-04-09 09:34:44 -0700 |
commit | 54e33a132bcbb353d6d85100dfe51e53fb3c5ace (patch) | |
tree | 14e62fce5145f086ec57f8fdf5e59a5619bfc98f /tests | |
parent | e555a5703d4581f11c6b5020811bf60b5ec98c41 (diff) | |
parent | 030020236c85c736892a6f8e0dcefca1681e5ce0 (diff) | |
download | pandoc-54e33a132bcbb353d6d85100dfe51e53fb3c5ace.tar.gz |
Merge pull request #1226 from tarleb/org-emphasis-reader
Org reader: Precise rules for the recognition of markup
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Tests/Readers/Org.hs | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/tests/Tests/Readers/Org.hs b/tests/Tests/Readers/Org.hs index 77b9d9327..efd8fe977 100644 --- a/tests/Tests/Readers/Org.hs +++ b/tests/Tests/Readers/Org.hs @@ -86,16 +86,37 @@ tests = unlines [ "this+that+ +so+on" , "seven*eight* nine*" , "+not+funny+" + , "this == self" ] =?> para (spcSep [ "this+that+", "+so+on" , "seven*eight*", "nine*" , strikeout "not+funny" + , "this" <> space <> "==" <> space <> "self" ]) + , "Adherence to Org's rules for markup borders" =: + "/t/& a/ / ./r/ (*l*) /e/! /b/." =?> + para (spcSep [ emph $ "t/&" <> space <> "a" + , "/" + , "./r/" + , "(" <> (strong "l") <> ")" + , (emph "e") <> "!" + , (emph "b") <> "." + ]) + + , "Inline math must stay within three lines" =: + unlines [ "$a", "b", "c$", "$d", "e", "f", "g$" ] =?> + para ((math "a\nb\nc") <> space <> + spcSep [ "$d", "e", "f", "g$" ]) + , "Markup may not span more than two lines" =: - unlines [ "/this *is", "not*", "emph/" ] =?> + unlines [ "/this *is +totally", "nice+ not*", "emph/" ] =?> para (spcSep [ "/this" - , (strong ("is" <> space <> "not")) + , (strong (spcSep + [ "is" + , (strikeout ("totally" <> space <> "nice")) + , "not" + ])) , "emph/" ]) , "Image" =: |