[GH-ISSUE #168] MD037 triggering for escaped astricks in math equations #146

Closed
opened 2026-03-03 01:24:07 +03:00 by kerem · 7 comments
Owner

Originally created by @nschonni on GitHub (Feb 27, 2019).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/168

I'm seeing this triggered from through the Markdownlint (0.12) invoke through Markdownlint-CLI (0.14)

Log((Sign(x) \* Sqrt(x \* x + 1) + 1) / x)

When I open the file in VS Code with the Markdownlint extension, it isn't picked up as an error though

Originally created by @nschonni on GitHub (Feb 27, 2019). Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/168 I'm seeing this triggered from through the Markdownlint (0.12) invoke through Markdownlint-CLI (0.14) ``` Log((Sign(x) \* Sqrt(x \* x + 1) + 1) / x) ``` When I open the file in VS Code with the Markdownlint extension, it isn't picked up as an error though
kerem 2026-03-03 01:24:07 +03:00
Author
Owner

@DavidAnson commented on GitHub (Feb 27, 2019):

This is an issue for igorshubovych/markdownlint-cli which doesn't (yet) recognize math blocks. See github.com/DavidAnson/vscode-markdownlint@bd71955cf9 for how this was implemented in the VS Code extension. I'd thought to confirm it worked correctly in the VS Code extension before updating the CLI.

(I'd transfer the issue, but don't seem to be able to do so into someone else's namespace.)

<!-- gh-comment-id:467740002 --> @DavidAnson commented on GitHub (Feb 27, 2019): This is an issue for igorshubovych/markdownlint-cli which doesn't (yet) recognize math blocks. See https://github.com/DavidAnson/vscode-markdownlint/commit/bd71955cf99bc0ace103b7b7fa121435446f5e32 for how this was implemented in the VS Code extension. I'd thought to confirm it worked correctly in the VS Code extension before updating the CLI. (I'd transfer the issue, but don't seem to be able to do so into someone else's namespace.)
Author
Owner

@nschonni commented on GitHub (Feb 27, 2019):

The code itself isn't actually in a code fence so I thought it might be a regex issue here

<!-- gh-comment-id:467740761 --> @nschonni commented on GitHub (Feb 27, 2019): The code itself isn't actually in a code fence so I thought it might be a regex issue here
Author
Owner

@DavidAnson commented on GitHub (Feb 27, 2019):

I assumed you just didn’t include the fence. I can have a closer look soon.

<!-- gh-comment-id:467753564 --> @DavidAnson commented on GitHub (Feb 27, 2019): I assumed you just didn’t include the fence. I can have a closer look soon.
Author
Owner

@nschonni commented on GitHub (Feb 27, 2019):

Here is one of the files I've hit it on https://github.com/dotnet/docs/blob/master/docs/visual-basic/language-reference/keywords/derived-math-functions.md
Note that it does have some unescaped *, but I still get the warnings after escaping all the asterisks in the file

<!-- gh-comment-id:467754637 --> @nschonni commented on GitHub (Feb 27, 2019): Here is one of the files I've hit it on https://github.com/dotnet/docs/blob/master/docs/visual-basic/language-reference/keywords/derived-math-functions.md Note that it does have some unescaped `*`, but I still get the warnings after escaping all the asterisks in the file
Author
Owner

@DavidAnson commented on GitHub (Feb 28, 2019):

I think this is unrelated to the new math block handling and is a bug in this library. Is there a chance the rule is disabled in your VS Code configuration? I’d expect to see the error reported there as well (though I can’t verify that right now).

<!-- gh-comment-id:468136599 --> @DavidAnson commented on GitHub (Feb 28, 2019): I think this is unrelated to the new math block handling and is a bug in this library. Is there a chance the rule is disabled in your VS Code configuration? I’d expect to see the error reported there as well (though I can’t verify that right now).
Author
Owner

@nschonni commented on GitHub (Feb 28, 2019):

I don't have any rules set in my VS Code, but I do have the Docs Authoring Extension that adds these rules https://github.com/Microsoft/vscode-docs-authoring/tree/master/docs-markdown/markdownlint-custom-rules

<!-- gh-comment-id:468142429 --> @nschonni commented on GitHub (Feb 28, 2019): I don't have any rules set in my VS Code, but I do have the Docs Authoring Extension that adds these rules https://github.com/Microsoft/vscode-docs-authoring/tree/master/docs-markdown/markdownlint-custom-rules
Author
Owner

@DavidAnson commented on GitHub (Mar 1, 2019):

Okay, so this is not showing up in VS Code because the range that markdownlint emits for the error causes an exception when reported by the extension because the starting character is out of range. That breaks linting and nothing else is output. Once fixed in markdownlint, this should start working in the VS Code extension.

<!-- gh-comment-id:468546998 --> @DavidAnson commented on GitHub (Mar 1, 2019): Okay, so this is not showing up in VS Code because the range that markdownlint emits for the error causes an exception when reported by the extension because the starting character is out of range. That breaks linting and nothing else is output. Once fixed in markdownlint, this should start working in the VS Code extension.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/markdownlint#146
No description provided.