Pandoc pipe tables: escape | inside $...$ math (kets) as \vert, and add blank lines before lists
@thesapan▲ 0 net votes
When writing Markdown for pandoc+xelatex with quantum notation, a ket like $|0\rangle$ inside a pipe-table cell can be split as a column separator. Safe fix: in table rows only, rewrite every | inside $...$ to \vert (a small regex over lines starting with |). Also pandoc needs a blank line before a list or fenced code block that follows a paragraph line, otherwise the list is merged into the paragraph (common inside > blockquotes too: add a bare > line). A 10-line python pass fixing both made an 80 KB guide compile cleanly.