Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
mrkkrp committed Dec 6, 2017
1 parent 438a02f commit 2cf063a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions Text/MMark/Parser.hs
Expand Up @@ -404,6 +404,7 @@ pUnorderedList = do
xs <- many $ do
bulletPos <- try $ do
p <- getPosition
guard (sourceColumn p >= sourceColumn startBulletPos)
void (char bullet)
eof <|> sc1
return p
Expand Down Expand Up @@ -432,6 +433,7 @@ pOrderedList = do
pos <- getPosition
(actual, alevel', indexPos) <- try $ do
p <- getPosition
guard (sourceColumn p >= sourceColumn startIndexPos)
i <- L.decimal
void (char del)
alevel' <- (<> pos1) <$> L.indentLevel
Expand Down
6 changes: 3 additions & 3 deletions tests/Text/MMarkSpec.hs
Expand Up @@ -106,7 +106,7 @@ spec = parallel $ do
"<h2>Foo</h2>\n<p>bar</p>\n"
it "CM30" $
"* Foo\n* * *\n* Bar" ==->
"<ul>\n<li>\nFoo\n</li>\n<li>\n<ul>\n<li>\n<ul>\n<li>\n\n</li>\n<li>\n\n</li>\n</ul>\n</li>\n</ul>\nBar\n</li>\n</ul>\n"
"<ul>\n<li>\nFoo\n</li>\n<li>\n<ul>\n<li>\n<ul>\n<li>\n\n</li>\n</ul>\n</li>\n</ul>\n</li>\n<li>\nBar\n</li>\n</ul>\n"
it "CM31" $
"- Foo\n- * * *" ==->
"<ul>\n<li>\nFoo\n</li>\n<li>\n<hr>\n</li>\n</ul>\n"
Expand Down Expand Up @@ -568,7 +568,7 @@ spec = parallel $ do
"<ul>\n<li>\n<p>foo</p>\n<p>notcode</p>\n</li>\n<li>\n<p>foo</p>\n</li>\n</ul>\n<!-- -->\n<pre><code>code\n</code></pre>\n"
it "CM271" $
"- a\n - b\n - c\n - d\n - e\n - f\n - g\n - h\n- i" ==->
"<ul>\n<li>a</li>\n<li>b</li>\n<li>c</li>\n<li>d</li>\n<li>e</li>\n<li>f</li>\n<li>g</li>\n<li>h</li>\n<li>i</li>\n</ul>\n"
"<ul>\n<li>\na\n</li>\n<li>\nb\n<ul>\n<li>\nc\n</li>\n<li>\nd\n<ul>\n<li>\ne\n</li>\n</ul>\n</li>\n<li>\nf\n</li>\n<li>\ng\n</li>\n</ul>\n</li>\n<li>\nh\n</li>\n<li>\ni\n</li>\n</ul>\n"
it "CM272" $
"1. a\n\n 2. b\n\n 3. c" ==->
"<ol>\n<li>\n<p>a</p>\n</li>\n<li>\n<p>b</p>\n</li>\n<li>\n<p>c</p>\n</li>\n</ol>\n"
Expand Down Expand Up @@ -610,7 +610,7 @@ spec = parallel $ do
"<ul>\n<li>\nfoo\n<ul>\n<li>\nbar\n</li>\n</ul>\nbaz\n</li>\n</ul>\n"
it "CM285" $
"- a\n - b\n - c\n\n- d\n - e\n - f" ==->
"<ul>\n<li>\n<p>a</p>\n<ul>\n<li>b</li>\n<li>c</li>\n</ul>\n</li>\n<li>\n<p>d</p>\n<ul>\n<li>e</li>\n<li>f</li>\n</ul>\n</li>\n</ul>\n"
"<ul>\n<li>\na\n<ul>\n<li>\nb\n</li>\n<li>\nc\n</li>\n</ul>\n</li>\n<li>\nd\n<ul>\n<li>\ne\n</li>\n<li>\nf\n</li>\n</ul>\n</li>\n</ul>\n"
context "6 Inlines" $
it "CM286" $
let s = "`hi`lo`\n"
Expand Down

0 comments on commit 2cf063a

Please sign in to comment.