docs: ensure footnotes work in raw HTML types table#115
Conversation
lidavidm
left a comment
There was a problem hiding this comment.
4 spaces in Markdown = code block. (I think people don't use this much anymore, but IIRC the original inventor liked it better than the triple-backtick since it hews closer to his original vision of having the markup itself look good.)
Ah, yeah. I think I've blocked that from my memory and Gruber did indeed put it in the spec. Something that confused me was that I thought "interpreting as raw HTML" would imply footnote processing would be totally disabled between the start end of the block. |
|
It's apparently in the spec/would explain why the first attempt at adding blank lines wouldn't work (examples 183 and 184, "The opening tag can be preceded by up to three spaces of indentation, but not four"): https://spec.commonmark.org/0.31.2/#example-183 |
|
Ah, yeah. Good thinking to be looking there. |
What's Changed
This is the necessary fix to make footnotes work correctly in our generated validation pages. Before this, footnotes didn't work when the footnote reference was inside a raw HTML table without special handling. The special handling is to add blank lines around the templates and ensure the cell content isn't indented any more than myst-parser tolerates. Apparently this is 0-3 spaces. Once you indent it to 4 spaces, footnotes break. Maybe a ReST thing?
For this change, we just don't indent and surround with blank lines.
Closes #114