summaryrefslogtreecommitdiff
path: root/src/Tests/Readers
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2011-01-30 08:21:48 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2011-01-30 08:21:48 -0800
commit71ca44db6e8893b0394e6cd38c637deee0524371 (patch)
tree3eeeb1b17fd690558611dd522556d539885ab059 /src/Tests/Readers
parent2a9f55cd785301e37f45f9c8e0666b1159e4c109 (diff)
LaTeX reader: Fixed bug with whitespace at beginning of file.
Previously a file beginning " hi" would cause a parse error. Also cleaned up comment parsing.
Diffstat (limited to 'src/Tests/Readers')
-rw-r--r--src/Tests/Readers/LaTeX.hs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/Tests/Readers/LaTeX.hs b/src/Tests/Readers/LaTeX.hs
index 7ea4c73ee..6d28441f8 100644
--- a/src/Tests/Readers/LaTeX.hs
+++ b/src/Tests/Readers/LaTeX.hs
@@ -41,6 +41,15 @@ tests = [ testGroup "basic"
header 1 ("text" +++ space +++ link "/url" "" "link")
]
+ , testGroup "space and comments"
+ [ "blank lines + space at beginning" =:
+ "\n \n hi" =?> para "hi"
+ , "blank lines + space + comments" =:
+ "% my comment\n\n \n % another\n\nhi" =?> para "hi"
+ , "comment in paragraph" =:
+ "hi % this is a comment\nthere\n" =?> para "hi there"
+ ]
+
, testGroup "citations"
[ natbibCitations
, biblatexCitations