AI & information

An AI Markdown table breaks when a cell contains a pipe

Keep literal pipes inside cells, distinguish source line breaks from visual wrapping, and check the table in its destination editor.

The table looks tidy in the AI chat, but a project name moves into the next column after you paste it into a document. Before asking for another polished version, check the punctuation in the original values. A character used as data may also control the table's structure.

Give the pipe its intended job

These examples use GitHub Flavored Markdown, or GFM. Other editors may interpret Markdown differently. In a GFM table, | separates cells; a literal pipe within a value needs an escape: A\|B should display as A|B in that cell.

Imagine two columns, Label and Note. Beneath their header and separator lines, the source row | A\|B | ready | describes one label and one note. Removing the backslash changes the structure instead of merely cleaning up typography. Keep the original value beside your draft so that a repair does not silently replace the pipe with a slash or remove it.

Ask the AI for the destination format explicitly and tell it to preserve every value. Inspect a row containing punctuation, not just the simplest first row. A rectangular result can still have content under the wrong heading.

Do not force wrapping with a source newline

A physical newline in the source is not a reliable way to put a second visual line inside a GFM cell. Keep a short note on one source line and let the destination wrap it. If it needs several paragraphs, place the explanation below the table and reference the row clearly.

Preview the pasted result in the editor where readers will see it. Check the headers, row count, literal A|B, and the last column. Then narrow the preview: readability on a small screen matters even when the syntax is correct. Preserve an untouched copy of the source values until the rendered table has passed these checks.

Sources & further reading

  1. GitHub: organizing information with tables
  2. GitHub Flavored Markdown: tables extension

Sources support the technical explanations. Examples and suggested checks are editorial guidance.