mirror of
https://github.com/pionxzh/chatgpt-exporter.git
synced 2026-10-02 19:07:43 -05:00
ChatGPT writes display math as `\[` and `\]` on their own lines. Only a one-line `\[...\]` became `$$`, the multi-line form got a single `$` on each side, which most markdown editors do not render. Formulas in messages with a code block were also escaped by the markdown round trip, such as `x\_1`, and `\[` inside code was rewritten. Convert display math to `$$` lines and inline math to `$`, skip code, and keep every formula out of the markdown round trip. Fixes #281