Skip to content

Markdown4D 2.0.0

Choose a tag to compare

@cmgeuze cmgeuze released this 31 Aug 08:48
· 37 commits to main since this release

The first tagged release of Markdown4D: a native Delphi CommonMark / GFM markdown library with a public AST, an incremental streaming parser, an HTML renderer, a lossless markdown writer, and custom-drawn VCL & FMX viewer and editor components. Delphi 12 Athens and Delphi 13, RTL-only, MIT licensed.

Highlights

  • Full CommonMark 0.31.2 conformance: all 652 official examples pass, plus the GFM extension corpora (tables, task list items, strikethrough, extended autolinks, tag filter).
  • A public typed AST with visitor, source spans and a fluent document builder, plus a lossless round-trip markdown writer.
  • An incremental / streaming parser built for editors and token-by-token LLM output; AppendMarkdown marshals to the UI thread for you.
  • Custom-drawn TMarkdownViewer and TMarkdownEditor for VCL and FMX: theming, selection, search, syntax-highlighted code, async images and design-time preview.
  • Native chart (chart code blocks) and mermaid (flowchart / sequence / pie) rendering, drawn by the library's own anti-aliased rasterizer and SVG engine, without a browser or third-party code.

Breaking change: safe rendering by default

TMarkdown.ToHtml now renders safely: raw HTML is omitted and scripting destinations (javascript:, vbscript:, file: and non-image data: schemes) are emptied. For byte-for-byte specification output on input you trust, use TMarkdown.ToUnsafeHtml, or configure a pipeline with UnsafeHtml / UnsafeLinks.

The viewer components route every remote image request, including each hop of a redirect chain, past the host's image settings and the OnRemoteImageRequest event.

See SECURITY.md for the exact promises and docs/API.md for the full public surface.

Installation

Source-only: add Source\Core (and, for the components, Source\Layout plus Source\Vcl or Source\Fmx) to the project search path. For a component-palette install, build the packages in packages\; see packages/INSTALL.md.