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

Error parsing markdown "code" backticks at end of line #346

Open
br-tyler-milner opened this issue Feb 10, 2022 · 0 comments
Open

Error parsing markdown "code" backticks at end of line #346

br-tyler-milner opened this issue Feb 10, 2022 · 0 comments

Comments

@br-tyler-milner
Copy link

I'm working on parsing an OpenAPI spec that I've written in YAML and noticed that this library is having trouble parsing markdown "code" formatting (using inline backticks) that I'm using in one of my descriptions.

This is the error I'm running into:

error: scanner: while scanning for the next token in line 60, column 1
found character that cannot start any token:
`
^

And this is an excerpt of the problematic YAML:

        details:
          type: string
          description: >-
            The details for this pet, if available.
            In some cases, the value of this
            property may include newline `\n`
            characters so that the content can be
            spread over multiple lines.
          example: pet details

As you can see, the `\n` at the end of one of the lines seems to be causing the problem and throwing the error in scanner.c. Unfortunately, I'm a bit rusty on my C so I'm not able to provide a fix right now, but I did want to go ahead and log this issue. As far as I can tell, this should be valid YAML. I've attached a sample project to this issue that demonstrates this problem.

yams-demo.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant