Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

YAML pipe syntax not parsed #175

Open
Nadrieril opened this issue May 13, 2020 · 3 comments
Open

YAML pipe syntax not parsed #175

Nadrieril opened this issue May 13, 2020 · 3 comments

Comments

@Nadrieril
Copy link
Contributor

---
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 c77d4f0 broke it

@Nadrieril
Copy link
Contributor Author

Nadrieril commented May 13, 2020

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

@srid srid added the bug Something isn't working label May 13, 2020
@srid
Copy link
Owner

srid commented May 13, 2020

Looks like we need some tests around for partitioner.

@srid srid changed the title YAML parsing bug YAML Block Style Indicators not parsed May 13, 2020
@srid srid changed the title YAML Block Style Indicators not parsed YAML pipe syntax not parsed May 13, 2020
@srid srid added regression and removed bug Something isn't working labels May 14, 2020
@srid srid added good first issue Good for newcomers and removed up for grabs labels Jun 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants