pymarkdown icon indicating copy to clipboard operation
pymarkdown copied to clipboard

no-space-in-emphasis warning triggered inside latex formula

Open arwedus opened this issue 2 years ago • 2 comments

Problem:

In the attached example, the following warning is issued:

$ pymarkdown --config pymarkdown.json.txt scan pymarkdown_no-space-in-emphasis_md037_in_formulas.md 
pymarkdown_no-space-in-emphasis_md037_in_formulas.md:3:43: MD037: Spaces inside emphasis markers (no-space-in-emphasis)

Expected result:

No warning is issued, because formula delimiters ($$, $) are detected as such (maybe via extension?) and the * sign is not considered as beginning or end marker of an emphasis.

Background: The text in the formula delimiters is parsed by LaTeX. It's not possible to escape the * sign inside a formula.

pymarkdown.json.txt pymarkdown_no-space-in-emphasis_md037_in_formulas.md

arwedus avatar Sep 15 '22 15:09 arwedus

Sorry for the delay, life happened... a lot. This is a good enhancement, and I am hoping to get at it soon. It is basically a special example of emphasis, and there are a couple more things like this to do at the same time.

jackdewinter avatar Feb 05 '23 18:02 jackdewinter

Hi @jackdewinter, no worries, thanks for considering my feature request! 🙂

arwedus avatar Feb 06 '23 21:02 arwedus