Skip to content

feat: add Markdown rendering package - #35

Merged
InDieTasten merged 1 commit into
mainfrom
feat/markdown-rendering
Oct 5, 2026
Merged

InDieTasten merged 1 commit into
mainfrom
feat/markdown-rendering

Conversation

@rsubrama83

Copy link
Copy Markdown
Collaborator

Closes #33

What

New package ShinyPDF.Markdown with a Markdown() extension on IContainer (namespace ShinyPDF.Fluent):

page.Content().Markdown(markdown, options => options.BaseFontSize = 11);

Markdown is parsed with Markdig and composed from existing elements (Column, Row, Text, Border, Line), so it wraps and pages like any other content.

Supported: headings, paragraphs, hard line breaks, bold, italic, strikethrough, inline code, code blocks, links and autolinks, nested bullet and numbered lists, blockquotes, horizontal rules. Raw HTML is rendered as plain text (never interpreted), images as their alt text. Tables and task lists are left for later.

MarkdownOptions covers base font size, spacing, list indent, link/code/quote/rule colors and a heading style override.

Why a separate package

The core ShinyPDF package keeps zero new dependencies; only consumers who want Markdown pull in Markdig.

Release impact

  • feat: commit: merging releases 2.1.0.
  • publish.yaml now builds and packs both projects with the same version. ShinyPDF.Markdown depends on ShinyPDF at that version and on Markdig 1.4.0.
  • First publish of the new package ID ShinyPDF.Markdown: please check the NuGet trusted publishing setup allows it.

Verification

  • 168 unit tests pass in Release (18 new in MarkdownTests, asserting on the composed element tree and styles, plus a full PDF generation).
  • Example render (MarkdownExamples) checked visually, image added to the docs.
  • Local dotnet pack inspected: nuspec dependencies, icon, readme and license are correct.

Docs

  • New how-to: docs/how-to/render-markdown.md
  • README section, docs index link, AGENTS.md updated (layout, pack command, current focus).

🤖 Generated with Claude Code

Add ShinyPDF.Markdown, a separate package with a Markdown() element
that parses Markdown with Markdig and composes it from existing
elements. Supports headings, paragraphs, bold, italic, strikethrough,
inline code, code blocks, links, nested bullet and numbered lists,
blockquotes and horizontal rules. Styling is configurable through
MarkdownOptions. Raw HTML is shown as text, images as alt text.

The publish workflow now builds and packs both packages with the same
version.

Closes #33

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@InDieTasten
InDieTasten merged commit f79ac61 into main Oct 5, 2026
1 check passed
@rsubrama83
rsubrama83 deleted the feat/markdown-rendering branch October 5, 2026 13:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add markdown rendering

2 participants