Markdown Flow

Back to Blog

Why ChatGPT Markdown Looks Broken and How to Fix It

Ask ChatGPT to show its work and you might get \( x^2 + 1 \) instead of a properly rendered equation, or a table that renders correctly in the chat window but breaks the moment you paste it somewhere else. This isn't a bug in your editor - it's how AI models write Markdown. Markdown Flow automatically detects and repairs these issues before rendering.

Why AI-Generated Markdown Is Sometimes Broken

Large language models are trained on a mix of formatting conventions, not a single strict Markdown spec. That produces a few recurring quirks:

  • Wrong math delimiters. Standard Markdown math uses $...$ and $$...$$, but models often fall back on LaTeX's native \( ... \) and \[ ... \] delimiters, which most Markdown renderers don't recognize at all.
  • Bare-bracket equations. Sometimes an equation shows up wrapped in plain brackets, like [ E = mc^2 ], with no math delimiters at all.
  • Malformed tables. A table might be missing its separator row, or have a different number of columns in different rows - subtle mistakes that are easy to miss by eye but that break table rendering.
  • Code blocks inside lists. A code example nested inside a numbered step sometimes loses its indentation, causing it to render as plain text instead of a formatted code block.

How Markdown Flow Fixes This Automatically

When you paste Markdown into Markdown Flow, it runs a repair pass before rendering:

  1. \( ... \) and \[ ... \] are normalized to $...$ and $$...$$ so KaTeX renders them correctly.
  2. Bare-bracket expressions that look like equations are detected and converted to proper math delimiters.
  3. Tables missing a separator row, or with uneven columns, are patched so they render as an actual table instead of plain text.
  4. Code blocks nested inside list items are re-indented so they render with syntax highlighting instead of collapsing into the surrounding paragraph.

You don't need to do anything - this happens automatically the moment you paste your content in.

An Example

Paste this exactly as ChatGPT might generate it, brackets and all:

markdown
The area of a circle is [ A = \pi r^2 ].

| Shape | Formula
| Circle | \( \pi r^2 \)
| Square | side^2

Even though the math delimiters are non-standard and the table is missing its separator row, Markdown Flow's live preview renders both correctly - a working equation and a properly formatted table - without you having to fix the source yourself.

Why This Matters

If you're pasting AI output into a plain Markdown viewer or a static site generator, these small inconsistencies mean broken equations and mangled tables in your final document. Catching and fixing them automatically means you can paste directly from ChatGPT, Claude, or Gemini and trust that what renders matches what you expect - no manual cleanup required.

Frequently Asked Questions

Does this change my original content? No - the repair only affects formatting syntax (delimiters, table structure, indentation), never your actual words.

Does this work with Claude and Gemini output too? Yes, the same quirks show up across AI assistants, and the same repair pass handles all of them.

What if my Markdown is already valid? Nothing changes - the repair pass only touches patterns it recognizes as broken; well-formed Markdown renders exactly as written.

Paste something straight from ChatGPT into Markdown Flow and watch the live preview render it correctly, broken delimiters and all.