YAML pipe syntax not parsed
---
title: |
Some title
---
Foo
Error:
user error (20eescg.md:2:0: error
|
2 | Some title
| ^
Unexpected ' ')
That used to work with the commit from a few hours ago, so I'm guessing https://github.com/srid/neuron/commit/c77d4f0920917921495e3cea5579a096cb8156b3 broke it
Took inspiration from https://stackoverflow.com/a/46227637 , and the following seems to work (no need to try):
startOfLine :: Parser ()
startOfLine = do
pos <- M.getSourcePos
guard (M.sourceColumn pos == M.pos1)
separatorP :: Parser ()
separatorP =
void $ startOfLine *> M.string "---" <* M.eol
Looks like we need some tests around for partitioner.
We may be able to borrow some ideas from mmark:
https://github.com/mmark-md/mmark/blob/ab4616e27b39c4a100223788eaa1b5911f1276d7/Text/MMark/Parser.hs#L157-L172
And specs:
https://github.com/mmark-md/mmark/blob/18c7d320f496f54833dfd24584f1760c7857b9b5/tests/Text/MMarkSpec.hs