[bug] `blocks` will be reset on `preprocess` every time and will break `.md` in `.md`
See original GitHub issueThe will not work when writing markdown codes in code blocks.
Lifecycle:
preprocess('.md') -> preprocess('.md/0_0.md') -> postprocess('.md/0_0.md') -> postprocess('.md')
This was not a problem before because .md
files are not linted by eslint before. By adding esling-plugin-mdx
which support .md
files, it will be a problem.
_Originally posted by @JounQin in https://github.com/eslint/eslint-plugin-markdown/pull/178#discussion_r593347558_
It’s clear to be an bug
https://github.com/eslint/eslint-plugin-markdown/blob/main/lib/processor.js#L219
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Extension API — Python-Markdown 3.4.1 documentation
An extension will patch into one or more stages of the parser: Preprocessors alter the source before it is passed to the parser....
Read more >pdoc.markdown2 API documentation
A fast and complete Python implementation of Markdown. ... Markdown is a text-to-HTML filter; it translates an easy-to-read / easy-to-write structured text format ......
Read more >Conditionally display a block of text in R Markdown
I tried to define a function my.render() , which preprocesses the Rmd file, and depending on the commentout argument, either keeps the HTML ......
Read more >Releases - Pandoc
Update INSTALL.md installation from source instructions. ... Require hslua-2.2.1, unless lua53 flag is set, and do not reset foreign encoding before running ...
Read more >Changelog - curl
wolfSSL: fix session management bug. Fixed in 7.85.0 - August 31 2022. Play video curl 7.85.0 release video. Changes: quic ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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
.md
and.markdown
files and have aREADME.md
file containing amarkdown
code block. If #14227 changes ESLint to run processors directly recursively, this would be even easier to reproduce.Yes, I should simplify the test case in current PR.