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

Crash of markdownlint-cli2 and vscode-markdownlint on invalid markdown #325

Open
lukep-coxauto opened this issue May 16, 2024 · 1 comment
Labels
bug Something isn't working dependencies Pull requests that update a dependency file

Comments

@lukep-coxauto
Copy link

Ran a big codebase of markdown through the linter, and found an edge case that results in the parser crashing and unable to process the remainder of the files for linting. This happens both from the cli version and the vscode version (since it seems like the vscode one just uses this lib internally)

Output from linter is:

[1:27:05 PM] ERROR: Exception while linting with markdownlint-cli2:
TypeError: e[n].slice is not a function

example markdown that reproduces:

1. some text
   :::note

inner text

:::

2. some more text

It appears to be related to a :::note style callout existing within an ordered list.

Some more versions that reproduce the crash:

- some text
   :::note

inner text

:::

- some more text
* some text
   :::note

inner text
:::
* some text
   :::note

a
@DavidAnson
Copy link
Owner

Thank you for reporting this! It looks like an issue with the micromark parsing library. I've opened an issue for them here: micromark/micromark#173.

@DavidAnson DavidAnson added bug Something isn't working dependencies Pull requests that update a dependency file labels May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working dependencies Pull requests that update a dependency file
Projects
None yet
Development

No branches or pull requests

2 participants