goldmark-customtag
September 16, 2025 ยท View on GitHub
goldmark-customtag is an extension for goldmark that turns lines prefixed with the provided prefix into lines wrapped in the provided HTML tag. for example, if you use it like so:
md := goldmark.New(
goldmark.WithExtensions(
customtag.New("::", "aside"),
),
)
then it will turn
:: *this* sort of text,
::
:: spread across multiple paragraphs
into
<aside>
<p><em>this</em> sort of text,</p>
<p>spread across multiple paragraphs</p>
</aside>
installation
go get github.com/tendstofortytwo/goldmark-customtag
license
MIT license; see LICENSE.md.