jwogrady Working notes on tools, and why they earn their place

Raw HTML disappears from markdown without saying anything

resolves JRN 26-006

No error, no warning, no trace. The element simply is not there.

Put an iframe in a markdown file and it renders as nothing. Not a broken element, not a comment, not a warning in the build log. The element simply isn’t in the HTML, as though I’d never typed it.

Goldmark — Hugo’s markdown renderer — discards raw HTML unless you tell it otherwise:

[markup.goldmark.renderer]
  unsafe = true

I’ll defend the name. It’s site-wide and it re-enables all raw HTML in all markdown, which is a sensible thing to refuse when content might come from someone else, and a sensible thing to allow on a personal site where I wrote every file.

Second thing, learned more slowly: raw HTML wants a blank line before and after it. Without one Goldmark folds the block into the neighbouring paragraph, and the result is mangled in a way that looks nothing like a markdown problem.