-
Notifications
You must be signed in to change notification settings - Fork 63
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
[bug] blocks
will be reset on preprocess
every time and will break .md
in .md
#181
Comments
Thanks for opening this so we can dig in. I think I follow what you're saying, but to be sure, can you provide an example Markdown document that triggers the bug? |
This issue will only occur when integrating with other plugins like Here is the fake version for testing. |
So maybe I shouldn't flag it as bug but a better compatibility with other markdown related ESLint plugins based on |
This seems related to https://github.com/eslint/eslint/pull/14227/files#r602802758. I can reproduce this today in a test if I configure this plugin to run on |
Yes, I should simplify the test case in current PR. |
The current implementation assumes the `blocks` module-level variable will only be used once per physical file. If the file contains a nested Markdown code block, the processor will be recursively run on the code block's virtual file.
…183) * Fix: use blocksCache instead of single blocks instance pass through lint messages from other plugins * refactor: use Map and delete map after postprocess remove unnecessary mdx example * Chore: add test case for blocksCache * Revert: downgrade remark-parse and unified * chore: remove unnecessary fallback check * refactor: simplify return statement
The will not work when writing markdown codes in code blocks.
Lifecycle:
This was not a problem before because
.md
files are not linted by eslint before. By addingesling-plugin-mdx
which support.md
files, it will be a problem.Originally posted by @JounQin in #178 (comment)
@btmills
It's clear to be an bug
https://github.com/eslint/eslint-plugin-markdown/blob/main/lib/processor.js#L219
The text was updated successfully, but these errors were encountered: