Improved fix to markdown noteBlock parser.
The last patch did not handle cases with > 4 spaces. Also added a more general test case.
This commit is contained in:
parent
f282b462bb
commit
e898f0abef
2 changed files with 4 additions and 9 deletions
|
@ -27,13 +27,8 @@ tests = [ testGroup "inline code"
|
|||
=?> para (codeWith ("",["haskell","special"],[("x","7")]) "*")
|
||||
]
|
||||
, testGroup "footnotes"
|
||||
[ "indent followed by newline" =: [_LIT|
|
||||
[^1]
|
||||
|
||||
[^1]: my note
|
||||
|
||||
|
||||
not in note
|
||||
|] =?> para (note (para "my note")) +++ para "not in note"
|
||||
[ "indent followed by newline" =:
|
||||
"[^1]\n\n[^1]: my note\n\n \nnot in note\n"
|
||||
=?> para (note (para "my note")) +++ para "not in note"
|
||||
]
|
||||
]
|
||||
|
|
|
@ -264,7 +264,7 @@ noteBlock = try $ do
|
|||
optional blankline
|
||||
optional indentSpaces
|
||||
raw <- sepBy rawLines (try (blankline >> indentSpaces >>
|
||||
notFollowedBy newline))
|
||||
notFollowedBy blankline))
|
||||
optional blanklines
|
||||
endPos <- getPosition
|
||||
let newnote = (ref, (intercalate "\n" raw) ++ "\n\n")
|
||||
|
|
Loading…
Reference in a new issue