Menu

1 / 2

Markdown Preview: Why My Pipe Tables Came Out as Plain Text (and How I Ship Clean HTML Now)

DEV Community: html·meng meng·about 23 hours ago
#UQiqxhTc
#devto2#devto#dev#markdown#html
Reading 0:00
15s threshold

Markdown Preview: Why My Pipe Tables Came Out as Plain Text (and How I Ship Clean HTML Now)

Last month I had to publish a changelog through our company CMS. It accepts raw HTML only. My source was Markdown, written against a GitHub wiki where every table, fence and blockquote rendered perfectly.

Pasted into the CMS, the tables collapsed into something like this:

| Feature | Supported | | --- | --- | | Tables | Yes |

Enter fullscreen mode

Exit fullscreen mode

No error message. No warning. Just pipes sitting in a paragraph, live on production for about twenty minutes before a colleague asked why the changelog looked like ASCII art.

The annoying part: our CMS does have a preview tab. I checked it. The preview rendered the raw HTML I had pasted, which was correct HTML, for the wrong content. The failure was upstream, in the conversion I never really did. My editor's Markdown plugin showed a nice table, so I assumed the file contained something a browser could use. It didn't.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.