Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Markdown+Math macros affected by this extension ... #967

Closed
goessner opened this issue Jun 21, 2021 · 4 comments
Closed

Markdown+Math macros affected by this extension ... #967

goessner opened this issue Jun 21, 2021 · 4 comments
Labels
Area: Math Res: As expected The existing behavior is by design or as expected.

Comments

@goessner
Copy link

... as is reproducable by

goessner/mdmath#114

After disabeling your extension, Markdown+Math works as expected.

I would be glad, if you have a short look into this ... might be possibly a name collision ... thanks

--
sg

@Lemmingh Lemmingh added Area: Math Res: Answered Discussion closed with no more specific state. labels Jun 21, 2021
@Lemmingh
Copy link
Collaborator

Thank you for reporting.

From the original issue goessner/mdmath#114 (comment):

"markdown.extension.math.enabled": false, //<- This fixes the macro issue

So, it's expected behavior.

As documented, setting math.enabled to false stops Markdown All in One from processing math rendering.

@Lemmingh
Copy link
Collaborator

Well, the collision:

math_block and math_inline

https://github.com/yzhang-gh/markdown-it-katex/blob/c77efb25e3e5eb3367b45077cc7c1473908fedc1/index.js#L195-L196
https://github.com/goessner/markdown-it-texmath/blob/61e637f2155801f7a5bf61acac492d5365368036/texmath.js#L225


I do not think any change to markdown-it-katex or markdown-it-texmath could or should land.

When multiple markdown-it plugins with the same goal are loaded at the same time, the result is mostly unpredictable.

The product of #570 is practical and sufficient:

Be sure to disable math.enabled option of this extension.


BTW, you might be interested in microsoft/vscode#124783. Fortunately, they also have a math.enabled option.

@yzhang-gh
Copy link
Owner

@goessner Thanks for reaching out.

As @Lemmingh said, it is expected as the document (math blocks) should not be processed by two extensions at the same time. We already provided a math.enabled option on our side. So I don't think there are other changes needed.

@Lemmingh Lemmingh added Res: As expected The existing behavior is by design or as expected. and removed Res: Answered Discussion closed with no more specific state. labels Aug 4, 2021
@Lemmingh
Copy link
Collaborator

Lemmingh commented Sep 6, 2021

@goessner
https://markdown-all-in-one.github.io/docs/guide/compatibility.html now has a dedicated explanation. You can reference it in your FAQ.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Math Res: As expected The existing behavior is by design or as expected.
Projects
None yet
Development

No branches or pull requests

3 participants