Add strip-html-blank-lines Quarto filter for embedded HTML tables#287
Merged
Conversation
Pointblank and great-tables emit HTML output with blank lines inside the wrapper <div>. Hugo's Goldmark closes a CommonMark type 6 HTML block at the first blank line, which causes the rest of the table to be parsed as markdown -- wrapping CSS in <p> tags and turning indented SVG content into <pre><code> blocks. The result is a visibly broken table on the rendered page. This adds a Quarto extension that collapses blank lines inside raw HTML blocks before Hugo sees them, wires it up across the ported pointblank posts via _metadata.yml, and re-renders those posts. A note in the authoring guide explains when to opt in. Also fixes a pre-existing YAML strictness issue in lets-workshop-together (toc: no -> toc: false) that was blocking re-render.
✅ Deploy Preview for posit-open-source canceled.
|
Publishing checklist
|
This post showcases pointblank validation tables (with the SVG-icon-in-cell content that triggers the visible <pre><code>/escaped-HTML breakage), so it needs the strip-html-blank-lines filter even though it lives under the great-tables directory. Other great-tables posts only exhibit the subtle CSS-paragraph variant of the bug, which doesn't visibly degrade table rendering, so they don't need the filter.
The installed pointblank package has three docstrings that contain \d without an r-prefix, so importing pointblank emits SyntaxWarning at parse time. Those warnings were leaking into the rendered .md as visible output above the validation table. Adding warning: false on the first import chunk suppresses them.
Blog YAML Checks
|
cwickham
added a commit
that referenced
this pull request
May 29, 2026
The pointblank validation table in the post was rendering as broken HTML in Hugo because the wrapper <div> contains blank lines that close Goldmark's HTML block parsing mid-table. The strip-html-blank-lines Quarto filter (added in #287) collapses those blank lines before Hugo sees the output. Opt this post in via its frontmatter and re-render.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
<div>,<table>, etc.) at the first blank line. Pointblank validation reports and great-tables tables emit HTML with blank lines inside their wrapper<div>, which causes Goldmark to drop out of HTML mode mid-table and re-parse the rest as markdown — wrapping CSS in<p>tags and turning indented SVG payloads into<pre><code>blocks. The result is visibly broken table styling on rendered posts.content/_extensions/strip-html-blank-lines/) that collapses blank lines inside raw HTML blocks before they reach Hugo.content/blog/ported/pointblank/_metadata.yml, and re-renders the five posts in that subdirectory.lets-workshop-together/index.qmd(toc: no→toc: false) that was blocking the re-render.content/blog/_authoring-guide.mdso future authors hitting the same symptom know what to reach for.This is the first of two PRs — once this lands, the polars libraries post (#286) can pick up the filter for the same fix.
Test plan
<p>-wrapped CSS, no<pre><code>SVG escapes):/blog/2025-04-04_intro-pointblank//blog/2025-05-02_all-about-actions//blog/2025-05-20_overhauled-user-guide//blog/2025-06-03_lets-workshop-together//blog/2025-06-04_validation-libs-2025/