Skip to content

Releases: thephpleague/commonmark

2.4.2

02 Feb 12:01
2.4.2
91c2429
Compare
Choose a tag to compare

Fixed

  • Fixed declaration parser being too strict
  • FencedCodeRenderer: don't add language- to class if already prefixed

New Contributors

Full Changelog: 2.4.1...2.4.2

2.4.1

30 Aug 16:57
2.4.1
3669d6d
Compare
Choose a tag to compare

Fixed

  • Fixed ExternalLinkProcessor not fully disabling the rel attribute when configured to do so (#992)

2.4.0

24 Mar 15:23
2.4.0
d44a246
Compare
Choose a tag to compare

See the upgrading guide for more information about the exception-related changes

Added

  • Added generic CommonMarkException marker interface for all exceptions thrown by the library
  • Added several new specific exception types implementing that marker interface:
    • AlreadyInitializedException
    • InvalidArgumentException
    • IOException
    • LogicException
    • MissingDependencyException
    • NoMatchingRendererException
    • ParserLogicException
  • Added more configuration options to the Heading Permalinks extension (#939):
    • heading_permalink/apply_id_to_heading - When true, the id attribute will be applied to the heading element itself instead of the <a> tag
    • heading_permalink/heading_class - class to apply to the heading element
    • heading_permalink/insert - now accepts none to prevent the creation of the <a> link
  • Added new table/alignment_attributes configuration option to control how table cell alignment is rendered (#959)

Changed

  • Change several thrown exceptions from RuntimeException to LogicException (or something extending it), including:
    • CallbackGenerators that fail to set a URL or return an expected value
    • MarkdownParser when deactivating the last block parser or attempting to get an active block parser when they've all been closed
    • Adding items to an already-initialized Environment
    • Rendering a Node when no renderer has been registered for it
  • HeadingPermalinkProcessor now throws InvalidConfigurationException instead of RuntimeException when invalid config values are given.
  • HtmlElement::setAttribute() no longer requires the second parameter for boolean attributes
  • Several small micro-optimizations
  • Changed Strikethrough to only allow 1 or 2 tildes per the updated GFM spec

Fixed

  • Fixed inaccurate @throws docblocks throughout the codebase, including ConverterInterface, MarkdownConverter, and MarkdownConverterInterface.
    • These previously suggested that only \RuntimeExceptions were thrown, which was inaccurate as \LogicExceptions were also possible.

2.3.9

15 Feb 14:08
2.3.9
c1e114f
Compare
Choose a tag to compare

Fixed

  • Fixed autolink extension not detecting some URIs with underscores (#956)

2.3.8

10 Dec 16:03
2.3.8
c493585
Compare
Choose a tag to compare

Fixed

  • Fixed parsing issues when mb_internal_encoding() is set to something other than UTF-8 (#951)

2.3.7

17 Nov 12:54
2.3.7
a36bd2b
Compare
Choose a tag to compare

Fixed

  • Fixed TaskListItemMarkerRenderer not including HTML attributes set on the node by other extensions (#947)

2.3.6

30 Oct 16:47
2.3.6
857afc4
Compare
Choose a tag to compare

Fixed

  • Fixed unquoted attribute parsing when closing curly brace is followed by certain characters (like a .) (#943)

2.3.5

29 Jul 11:00
2.3.5
84d7448
Compare
Choose a tag to compare

Fixed

  • Fixed error using InlineParserEngine when no inline parsers are registered in the Environment (#908)

2.3.4

17 Jul 16:26
2.3.4
155ec1c
Compare
Choose a tag to compare

Changed

  • Made a number of small tweaks to the embed extension's parsing behavior to fix #898:
    • Changed EmbedStartParser to always capture embed-like lines in container blocks, regardless of parent block type
    • Changed EmbedProcessor to also remove Embed blocks that aren't direct children of the Document
    • Increased the priority of EmbedProcessor to 1010

Fixed

  • Fixed EmbedExtension not parsing embeds following a list block (#898)

2.3.3

07 Jun 21:30
2.3.3
0da1dca
Compare
Choose a tag to compare

Fixed

  • Fixed DomainFilteringAdapter not reindexing the embed list (#884, #885)