simov / markdown-viewer

Markdown Viewer / Browser Extension
MIT License
1.08k stars 135 forks source link

Anomaly in ChatGPT markdown file display #251

Closed TJOnline2112 closed 2 months ago

TJOnline2112 commented 2 months ago

CHATGPT - MarkdownPreview comparison

Hello, new to Github (hope this is a 'bug ticket') and am exploring Markdown-Viewer. It's very nice, except for an anomaly. Notice that in the attached image, MV consistently echoes whatever formula it encounters in plain text. In the image, those are "limx->3 x-3x2-9" and "limx->0 xsin(3x). Maybe my settings are screwy? I'm trying to transform the markdown MD files exported by Chat-GPT Math Solver into PDFs for viewing and printing. Thanks much.

simov commented 2 months ago

Can you copy/paste the precise markdown syntax here? Also make sure that the mathjax option is enabled.

TJOnline2112 commented 2 months ago

example of Problem Here's a specific as appears relative to the original CHATGPT chat.

settings Here are my settings.

portion of ShortQuiz.md Here is the portion of the MD file between the text "1. Determine" and the text "diverges." I assume the anomaly is somewhere in between.

ShortQuiz.md Here is the entire MD file, if it helps. Thx

simov commented 2 months ago

Thanks for the detailed bug report.

To be fair though, that's MathML syntax, meaning part of HTML and not Markdown in any way. You can change the file extension of your document above and load it directly in your web browser. You will see that the exact same error is present there, meaning the MathML syntax provided is incorrect and the browser does not know how to render it correctly.

Looking at the attached HTML, the outer most tag contains a class called katex, meaning most likely the web app was using katex to render the math equations, but then the export to MathML was incorrect, I assume.

TJOnline2112 commented 2 months ago

Thank you so much for your time, which I've apparently wasted, Simov. Tried your suggestion and sure enough, you are exactly right. It appears that my issue is with CHATGPT and not Markdown-Viewer at all. And thanks for your insight. Cheers.