Skip to content

Releases: commonmark/commonmark-java

commonmark-java 0.17.1

04 Feb 00:02
Compare
Choose a tag to compare

Fixed

  • Fix emphasis surrounded by non-BMP punctuation/whitespace characters
    (characters that are longer than one UTF-16 "char"). Note that this is
    an edge case with rarely used Unicode characters, which a lot of other
    implementations don't handle correctly.
  • Fix tables where the row starts with spaces and then the first | -
    rows that didn't have spaces before were not affected (#199). This bug
    is present in 0.16.1 and 0.17.0.

commonmark-java 0.17.0

15 Jan 06:13
Compare
Choose a tag to compare

Changed

  • ACTION REQUIRED: Maven groupId has changed from com.atlassian.commonmark to org.commonmark
    • To continue getting new versions of commonmark-java, change the Maven coordinates in your dependencies:
    • Old: <groupId>com.atlassian.commonmark</groupId>
    • New: <groupId>org.commonmark</groupId>

commonmark-java 0.16.1

11 Dec 03:23
Compare
Choose a tag to compare

Added

  • Support for including source spans on block and inline nodes (#1):
    • Answer for "Where in the source input (line/column position and length) does this node come from?"
    • Useful for things like editors that want to keep the input and rendered output scrolled to the same lines,
      or start editing on the node that was selected.
    • Use includeSourceSpans on Parser.Builder to enable,
      either with IncludeSourceSpans.BLOCKS or IncludeSourceSpans.BLOCKS_AND_INLINES
    • Read data with Node.getSourceSpans
    • Note that enabling this has a small performance impact on parsing (about 10%)

Changed

  • In order to support source spans (see above), a few of the extension
    APIs changed. It should only affect users implementing their own
    extensions. See the Javadoc to see what changed.
  • YAML front matter extension: Support dots in key names

commonmark-parent-0.15.2

20 Jul 10:43
Compare
Choose a tag to compare

Fixed

  • image-attributes extension: Fix unexpected altering of text in case
    parsing of attributes fails, e.g. {NN} text -> {NN text}, thanks @jk1

commonmark-parent-0.15.1

20 Jul 10:42
Compare
Choose a tag to compare

Added

  • Add text content rendering support for InsExtension

commonmark-parent-0.15.0

20 Jul 10:41
Compare
Choose a tag to compare

Added

  • Extension for width/height attributes for images, thanks @dohertyfjatl
    • Syntax: ![text](/url.png){width=640 height=480}
    • Use class ImageAttributesExtension in artifact commonmark-ext-image-attributes
  • Extension for task lists (GitHub-style), thanks @dohertyfjatl
    • Syntax:
      - [x] task #1
      - [ ] task #2
      
    • Use class TaskListItemsExtension in artifact commonmark-ext-task-list-items

commonmark-parent-0.14.0

20 Jul 10:40
Compare
Choose a tag to compare

Added

  • Add sanitizeUrls to HtmlRenderer.Builder to enable sanitizing URLs
    of <a> and <img> tags. Sanitizing logic can be customized via
    urlSanitizer. Thanks @VandorpeDavid

commonmark-java 0.13.1

25 Nov 06:20
Compare
Choose a tag to compare

Fixed

  • Fix potential StackOverflowError for regular expressions used in the
    inline parser (e.g. when parsing long HTML), thanks @lehvolk

commonmark-java 0.13.0

16 Jul 01:27
Compare
Choose a tag to compare

Added

  • LinkReferenceDefinition nodes are now part of the document (not
    rendered by default).
  • InlineParserContext.getLinkReferenceDefinition was added to allow
    custom inline parsers to look up definitions for reference links.

Changed

  • Performance improvements compared to previous version 🚀:
    • Parsing 7-10% faster
    • HTML rendering 105% faster - or in other words, twice as fast!
  • Update to CommonMark spec 0.29 (#156):
    • Change how newlines/spaces are handled in inline code
    • Info strings for tilde code blocks can contain backticks and tildes
    • Allow spaces inside link destinations in pointy brackets
    • Disallow link destination beginning with < unless it is inside <..>
    • Disallow unescaped '(' in link title in parens
    • Disallow indenting list item marker by more than 3 spaces
    • No longer treat <meta> as a block tag
    • Link reference definitions can now be in setext headings too
  • Tables extension: Changes to match GitHub implementation:
    • Escaping now only considers pipe characters when parsing tables:
      \| results in a literal | instead of a column, everything else
      is passed through to inline parsing.
    • Table body can now contain lazy continuation lines (without |).
      An empty line or another block is needed to interrupt the table.
    • For tables without a body, <tbody> is no longer rendered in HTML
    • See https://github.github.com/gfm/#tables-extension- for details
  • Check non-null arguments early and provide a nicer message

Fixed

  • Fix incorrectly preserving HTML entities when rendering attributes
  • Fix pathological case with input [\\\\... (a lot of backslashes)
  • Fix pathological case with input []([]([](...

commonmark-java 0.12.1

22 Nov 00:31
Compare
Choose a tag to compare

Changed

  • 🚀 Speed up parsing significantly: Compared to the previous version, the
    benchmarks show up to 55% faster parsing for both small and large
    documents! (#137, #140)
  • Parse backslash followed by unescapable character the same way as
    the reference implementations.
  • Build and test on Java 11 as well.
  • autolink: Stop URLs at " and ` as well

Fixed

  • Fix tab handling in ATX and Setext headings.