commonmark-java 0.7.0
New features:
- Plain text content renderer (#58), thanks to @JinneeJ!
- Renders a plain text representation of a document instead of HTML, see
TextContentRendererin core. - Extensible in the same way as HTML rendering.
- Renders a plain text representation of a document instead of HTML, see
- Heading anchor extension (#26), thanks to @paulthom12345!
- Adds "id" attribute to heading tags (e.g.
<h1 id="heading">Heading</h1>), useful for linking to sections of a document. - ID generation logic can also be used by itself via the
IdGeneratorclass. - Use class
HeadingAnchorExtensionin artifactcommonmark-ext-heading-anchor
- Adds "id" attribute to heading tags (e.g.
- Ins (underline) extension (#54), thanks to @pabranch!
- Enables underlining of text by enclosing it in
++. It's rendered as aninstag in HTML. - Use class
InsExtensionin artifactcommonmark-ext-ins.
- Enables underlining of text by enclosing it in
API changes:
HtmlRendererand related classes moved fromorg.commonmark.htmltoorg.commonmark.renderer.htmlHtmlRenderer.Builderno longer takes anAttributeProvider, but uses aAttributeProviderFactoryto instantiate a new provider for each rendering. Code needs to be changed to create a factory and then return the existing provider from itscreatemethod, similar to node renderers.NodeRendererFactorywas renamed toHtmlNodeRendererFactory, same for related classes (as there's a corresponsing interface for text content rendering)