From 71ca44db6e8893b0394e6cd38c637deee0524371 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Sun, 30 Jan 2011 08:21:48 -0800 Subject: 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. --- src/Tests/Readers/LaTeX.hs | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/Tests') 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 -- cgit v1.2.3