From 5c067bb457a96d8c7c35c9e1ca114169a02c1d2d Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Sun, 13 Jan 2013 11:14:50 -0800 Subject: RST reader: Line block improvements. * Use nonbreaking spaces for initial indent (otherwise lost in HTML and LaTeX). * Allow multiple paragraphs in a single line block. --- tests/Tests/Readers/RST.hs | 4 ++-- tests/rst-reader.native | 4 ++-- tests/rst-reader.rst | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'tests') diff --git a/tests/Tests/Readers/RST.hs b/tests/Tests/Readers/RST.hs index fdce7c8f6..0ad21f224 100644 --- a/tests/Tests/Readers/RST.hs +++ b/tests/Tests/Readers/RST.hs @@ -18,8 +18,8 @@ infix 4 =: tests :: [Test] tests = [ "line block with blank line" =: - "| a\n|\n| b" =?> para (str "a" <> linebreak <> - linebreak <> str " " <> str "b") + "| a\n|\n| b" =?> para (str "a") <> + para (str "\160b") , "field list" =: [_LIT| :Hostname: media08 diff --git a/tests/rst-reader.native b/tests/rst-reader.native index e4419dd13..895d06d69 100644 --- a/tests/rst-reader.native +++ b/tests/rst-reader.native @@ -232,8 +232,8 @@ Pandoc (Meta {docTitle = [Str "Pandoc",Space,Str "Test",Space,Str "Suite",Str ": ,Para [Str "Another",Space,Str "paragraph"] ,Para [Str "A",Space,Str "third",Space,Str "paragraph"] ,Header 1 ("",[],[]) [Str "Line",Space,Str "blocks"] -,Para [Str "But",Space,Str "can",Space,Str "a",Space,Str "bee",Space,Str "be",Space,Str "said",Space,Str "to",Space,Str "be",LineBreak,Str " or",Space,Str "not",Space,Str "to",Space,Str "be",Space,Str "an",Space,Str "entire",Space,Str "bee,",LineBreak,Str " when",Space,Str "half",Space,Str "the",Space,Str "bee",Space,Str "is",Space,Str "not",Space,Str "a",Space,Str "bee,",LineBreak,Str " due",Space,Str "to",Space,Str "some",Space,Str "ancient",Space,Str "injury?"] -,Para [Str "Continuation",Space,Str "line",LineBreak,Str " and",Space,Str "another"] +,Para [Str "But",Space,Str "can",Space,Str "a",Space,Str "bee",Space,Str "be",Space,Str "said",Space,Str "to",Space,Str "be",LineBreak,Str "\160\160\160\160or",Space,Str "not",Space,Str "to",Space,Str "be",Space,Str "an",Space,Str "entire",Space,Str "bee,",LineBreak,Str "\160\160\160\160\160\160\160\160when",Space,Str "half",Space,Str "the",Space,Str "bee",Space,Str "is",Space,Str "not",Space,Str "a",Space,Str "bee,",LineBreak,Str "\160\160\160\160\160\160\160\160\160\160\160\160due",Space,Str "to",Space,Str "some",Space,Str "ancient",Space,Str "injury?"] +,Para [Str "Continuation",Space,Str "line",LineBreak,Str "\160\160and",Space,Str "another"] ,Header 1 ("",[],[]) [Str "Simple",Space,Str "Tables"] ,Table [] [AlignDefault,AlignDefault,AlignDefault] [0.0,0.0,0.0] [[Plain [Str "col",Space,Str "1"]] diff --git a/tests/rst-reader.rst b/tests/rst-reader.rst index 14f57da18..970ab4d4a 100644 --- a/tests/rst-reader.rst +++ b/tests/rst-reader.rst @@ -454,7 +454,7 @@ Line blocks | or not to be an entire bee, | when half the bee is not a bee, | due to some ancient injury? - +| | Continuation line | and -- cgit v1.2.3