question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[bug] `blocks` will be reset on `preprocess` every time and will break `.md` in `.md`

See original GitHub issue

The 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_


@btmills

It’s clear to be an bug

https://github.com/eslint/eslint-plugin-markdown/blob/main/lib/processor.js#L219

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
btmillscommented, Mar 27, 2021

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 a README.md file containing a markdown code block. If #14227 changes ESLint to run processors directly recursively, this would be even easier to reproduce.

0reactions
JounQincommented, Mar 28, 2021

Yes, I should simplify the test case in current PR.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found