mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2026-04-25 17:26:22 +03:00
[GH-ISSUE #296] Some confusing error message with display-mode math and code blocks #253
Labels
No labels
bug
enhancement
enhancement
enhancement
fixed in next
fixed in next
fixed in next
new rule
new rule
new rule
pull-request
question
refactoring
refactoring
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/markdownlint#253
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @rqy2002 on GitHub (Jun 9, 2020).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/296
When I write my blog I write something wrong like this:
(Notice I add a comma at the end of the displaymode-math, this is the true mistake)
And markdownlint gives me two confusing error:
Actually there is nothing wrong with the code, but the error message makes me spend many time to find the mistake. I think there must be something wrong checking the rules, or maybe there should be another rule like "no character at same line after display-mode math formula"
@rqy2002 commented on GitHub (Jun 9, 2020):
And when I try to find the mistake, I have to close autofix. Otherwise it will add space between all # and include, make me press ctrl-z all the time. I think this must be a bug.
@DavidAnson commented on GitHub (Jun 9, 2020):
This looks like an issue related to the plug-in that the VS Code extension includes to recognize math blocks like the one you are using at the top. Without that extension present, there are no false violations present:
https://dlaa.me/markdownlint/#%25m%23%20Issue%20296%0A%0A%24%241%2B1%3D2%24%24%20%2C%0A%0ATHERE%20ARE%20MANY%20PARAGRAPHS%0A%0A...%0A%0ATHERE%20ARE%20MANY%20PARAGRAPHS%0A%0A%60%60%60cpp%0A%23include%20%3Calgorithm%3E%0A%60%60%60%0A
@DavidAnson commented on GitHub (Jun 9, 2020):
Confirmed - you can paste your sample here to see that the math block is not recognized as such when the comma is present: http://waylonflinn.github.io/markdown-it-katex/
@DavidAnson commented on GitHub (Jun 9, 2020):
As an extension to the Markdown syntax, I’m not sure there is a specification here. The project page is not detailed enough to determine whether this is intended or not. (https://github.com/waylonflinn/markdown-it-katex) However, the fix would need to come from the plug-in rather than the markdownlint library or the VS Code extension.
@DavidAnson commented on GitHub (Jun 24, 2020):
I'll automatically update to a new version of the plugin if a fix becomes available - closing the issue here for now.
valid-link-fragments#881valid-link-fragments#2730