Open scinos opened 3 years ago
Looks like the problem is in the regular expression in https://github.com/leo-buneev/eslint-plugin-md/blob/master/lib/processors/mdProcessor.js#L12, as it doesn't account for indented blocks. In the above example, it thinks there is a single code block from the 3rd line to the end of the file.
When the codeblock is indented followed by a codeblock that is not, the parser has a really bad time trying to parse it.
I created a repo with a reproduction case: https://github.com/scinos/eslint-md-parsing-error
Input:
Lint errors (
./node_modules/.bin/eslint .
):Output when using autofix (
./node_modules/.bin/eslint . --fix
):I found two workarounds:
1) Removing the language tag from the first codeblock 2) Un-indenting the first codeblock