Changelog
All notable changes made in 2.x
releases are shown below. See the full list of releases for the complete changelog.
2.4.2 - 2024-02-02
Fixed
- Fixed declaration parser being too strict
FencedCodeRenderer
: don’t addlanguage-
to class if already prefixed
New Contributors
- @sergiy-petrov made their first contribution in https://github.com/thephpleague/commonmark/pull/997
- @clustermin made their first contribution in https://github.com/thephpleague/commonmark/pull/988
- @peter279k made their first contribution in https://github.com/thephpleague/commonmark/pull/996
Full Changelog: https://github.com/thephpleague/commonmark/compare/2.4.1…2.4.2
2.4.1 - 2023-08-30
Fixed
- Fixed
ExternalLinkProcessor
not fully disabling therel
attribute when configured to do so (#992)
2.4.0 - 2023-03-24
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
- Whentrue
, theid
attribute will be applied to the heading element itself instead of the<a>
tagheading_permalink/heading_class
- class to apply to the heading elementheading_permalink/insert
- now acceptsnone
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
toLogicException
(or something extending it), including:CallbackGenerator
s that fail to set a URL or return an expected valueMarkdownParser
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 throwsInvalidConfigurationException
instead ofRuntimeException
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, includingConverterInterface
,MarkdownConverter
, andMarkdownConverterInterface
.- These previously suggested that only
\RuntimeException
s were thrown, which was inaccurate as\LogicException
s were also possible.
- These previously suggested that only
Older Versions
Please see the full list of releases for the complete changelog.