Skip to content
Snippets Groups Projects
Commit cacd245a authored by Oleg Grenrus's avatar Oleg Grenrus Committed by Alec Theriault
Browse files

Make a fixture of weird parsing of lists (#997)

The second example is interesting.
If there's a list directly after the header, and that list has
deeper structure, the parser is confused: It finds two lists:

 - One with the first nested element,
 - everything after it

I'm not trying to fix this, as I'm not even sure this is a bug,
and not a feature.
parent 032ff0dd
No related branches found
No related tags found
No related merge requests found
* Something about foo
@
foo :: a -> b -> c
foo a b = bar c b
@
* Something about bar
@
bar :: a -> b -> c
bar a b = foo b a
@
* And then we continue
DocUnorderedList
[DocAppend
(DocParagraph (DocString "Something about foo"))
(DocCodeBlock
(DocString
(concat ["foo :: a -> b -> c\n", "foo a b = bar c b\n"]))),
DocAppend
(DocParagraph (DocString "Something about bar"))
(DocCodeBlock
(DocString
(concat ["bar :: a -> b -> c\n", "bar a b = foo b a\n"]))),
DocParagraph (DocString "And then we continue")]
=== Title
* List directly
* after the title
@
with some inline things
@
* is parsed weirdly
DocAppend
(DocAppend
(DocHeader
Header {headerLevel = 3, headerTitle = DocString "Title"})
(DocUnorderedList
[DocParagraph (DocString "List directly"),
DocAppend
(DocParagraph (DocString "after the title"))
(DocCodeBlock (DocString "with some inline things\n"))]))
(DocUnorderedList [DocParagraph (DocString "is parsed weirdly")])
......@@ -91,7 +91,6 @@ test-suite fixtures
main-is: Fixtures.hs
ghc-options: -Wall -O0
hs-source-dirs: fixtures
buildable: False
build-depends:
base >= 4.5 && < 4.13
, base-compat >= 0.9.3 && < 0.11
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment