Version. 0.1 Date. 2026-05-02 Status. Bug fix amendment to render-download-cr-v0_1.md.
The PDF materializer takes render_content and places it into the HTML template without converting markdown syntax to HTML. The result: ## headings, italic markers, and --- dividers appear as literal characters in the PDF. The frontend's MarkdownPanel handles this conversion for SHOW CONTENT, but the server-side materializer skips it.
markdown dependency
uv add markdown
In materializers.py, after extracting the text content from render_content and before inserting into the PDF template:
import markdown
def _render_markdown_to_html(text: str) -> str:
"""Convert markdown text to HTML for PDF materialization."""
return markdown.markdown(
text,
extensions=["extra", "sane_lists"],
)
The extra extension handles fenced code blocks, footnotes, tables, and other common markdown extensions. The sane_lists extension handles list parsing more predictably.
Both materialize_pdf and materialize_html should run the content through _render_markdown_to_html() before inserting into the template. The MD materializer serves raw text and should NOT convert.
Add styling for the rendered markdown elements that will now appear:
hr {
border: none;
border-top: 1px solid #ccc;
margin: 1.5em 0;
}
em {
font-style: italic;
}
strong {
font-weight: 600;
}
blockquote {
margin: 1em 0;
padding-left: 1em;
border-left: 3px solid #ccc;
color: #555;
}
code {
font-family: 'IBM Plex Mono', monospace;
font-size: 0.9em;
background: #f5f2eb;
padding: 0.1em 0.3em;
border-radius: 2px;
}
pre code {
display: block;
padding: 1em;
overflow-x: auto;
}
Update test_download_pdf_produced_render to verify that markdown syntax in render_content is converted to HTML in the output. For example, verify the PDF content does NOT contain literal ## or ... markers.
Read this amendment. The PDF materializer is dumping raw markdown
into the template without converting it to HTML. The Operator's PDF
shows literal ## and *...* markers.
Fix:
1. uv add markdown
2. Add _render_markdown_to_html() using markdown.markdown() with
extensions=["extra", "sane_lists"]
3. Call it in materialize_pdf and materialize_html before template
insertion. Do NOT call it in materialize_md.
4. Add CSS for hr, em, strong, blockquote, code, pre to the PDF
template.
5. Update the PDF test to verify markdown is rendered, not literal.
Regenerate the Goosey PDF after the fix and stage at /tmp/goosey-test.pdf
for Operator verification.
DUNIN7 — Done In Seven LLC — Miami, Florida Render download amendment — v0.1 — 2026-05-02