Changelog
All notable changes made in 2.x
releases are shown below. See the full list of releases for the complete changelog.
2.5.3 - 2024-08-16
Changed
- Made compatible with CommonMark spec 0.31.1, including:
- Remove
source
, addsearch
to list of recognized block tags
- Remove
Full Changelog: https://github.com/thephpleague/commonmark/compare/2.5.2…2.5.3
2.5.2 - 2024-08-14
Changed
- Boolean attributes now require an explicit
true
value (#1040)
Fixed
- Fixed regression where text could be misinterpreted as an attribute (#1040)
Full Changelog: https://github.com/thephpleague/commonmark/compare/2.5.1…2.5.2
2.5.1 - 2024-07-24
Fixed
- Fixed attribute parsing incorrectly parsing mustache-like syntax (#1035)
- Fixed incorrect
Table
start line numbers (#1037)
New Contributors
- @jasonvarga made their first contribution in https://github.com/thephpleague/commonmark/pull/1035
Full Changelog: https://github.com/thephpleague/commonmark/compare/2.5.0…2.5.1
2.5.0 - 2024-07-22
Added
- The
AttributesExtension
now supports attributes without values (#985, #986) - The
AutolinkExtension
exposes two new configuration options to override the default behavior (#969, #987):autolink/allowed_protocols
- an array of protocols to allow autolinking forautolink/default_protocol
- the default protocol to use when none is specified
Changed
- Made compatible with CommonMark spec 0.31.0, including:
- Allow closing fence to be followed by tabs
- Remove restrictive limitation on inline comments
- Unicode symbols now treated like punctuation (for purposes of flankingness)
- Trailing tabs on the last line of indented code blocks will be excluded
- Improved HTML comment matching
Paragraph
s only containing link reference definitions will be kept in the AST until theDocument
is finalized- (These were previously removed immediately after parsing the
Paragraph
)
- (These were previously removed immediately after parsing the
Fixed
- Fixed list tightness not being determined properly in some edge cases
- Fixed incorrect ending line numbers for several block types in various scenarios
- Fixed lowercase inline HTML declarations not being accepted
New Contributors
- @svenluijten made their first contribution in https://github.com/thephpleague/commonmark/pull/986
Full Changelog: https://github.com/thephpleague/commonmark/compare/2.4.4…2.5.0
2.4.4 - 2024-07-22
Fixed
- Fixed SmartPunct extension changing already-formatted quotation marks (#1030)
Full Changelog: https://github.com/thephpleague/commonmark/compare/2.4.3…2.4.4
2.4.3 - 2024-07-22
Fixed
- Fixed the Attributes extension not supporting CSS level 3 selectors (#1013)
- Fixed
UrlAutolinkParser
incorrectly parsing text containingwww
anywhere before an autolink (#1025)
New Contributors
- @nfreader made their first contribution in https://github.com/thephpleague/commonmark/pull/1016
- @macbookandrew made their first contribution in https://github.com/thephpleague/commonmark/pull/1025
- @xavierlacot made their first contribution in https://github.com/thephpleague/commonmark/pull/1013
Full Changelog: https://github.com/thephpleague/commonmark/compare/2.4.2…2.4.3
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
2.3.9 - 2023-02-15
Fixed
- Fixed autolink extension not detecting some URIs with underscores (#956)
2.3.8 - 2022-12-10
Fixed
- Fixed parsing issues when
mb_internal_encoding()
is set to something other thanUTF-8
(#951)
2.3.7 - 2022-11-17
Fixed
- Fixed
TaskListItemMarkerRenderer
not including HTML attributes set on the node by other extensions (#947)
2.3.6 - 2022-10-30
Fixed
- Fixed unquoted attribute parsing when closing curly brace is followed by certain characters (like a
.
) (#943)
2.3.5 - 2022-07-29
Fixed
- Fixed error using
InlineParserEngine
when no inline parsers are registered in theEnvironment
(#908)
2.3.4 - 2022-07-17
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 removeEmbed
blocks that aren’t direct children of theDocument
- Increased the priority of
EmbedProcessor
to1010
- Changed
Fixed
- Fixed
EmbedExtension
not parsing embeds following a list block (#898)
2.3.3 - 2022-06-07
Fixed
- Fixed
DomainFilteringAdapter
not reindexing the embed list (#884, #885)
2.3.2 - 2022-06-03
Fixed
- Fixed FootnoteExtension stripping extra characters from tab-indented footnotes (#881)
2.2.5 - 2022-06-03
Fixed
- Fixed FootnoteExtension stripping extra characters from tab-indented footnotes (#881)
2.3.1 - 2022-05-14
Fixed
- Fixed AutolinkExtension not ignoring trailing strikethrough syntax (#867)
2.2.4 - 2022-05-14
Fixed
- Fixed AutolinkExtension not ignoring trailing strikethrough syntax (#867)
2.3.0 - 2022-04-07
Added
- Added new
EmbedExtension
(#805) - Added
DocumentRendererInterface
as a replacement for the now-deprecatedMarkdownRendererInterface
Deprecated
- Deprecated
MarkdownRendererInterface
; useDocumentRendererInterface
instead
2.2.3 - 2022-02-26
Fixed
- Fixed front matter parsing with Windows line endings (#821)
2.1.3 - 2022-02-26
Fixed
- Fixed front matter parsing with Windows line endings (#821)
2.2.2 - 2022-02-13
Fixed
- Fixed double-escaping of image alt text (#806, #810)
- Fixed Psalm typehints for event class names
2.1.2 - 2022-02-13
Fixed
- Fixed double-escaping of image alt text (#806, #810)
- Fixed Psalm typehints for event class names
2.2.1 - 2022-01-25
Fixed
- Fixed
symfony/deprecation-contracts
constraint
Removed
- Removed deprecation trigger from
MarkdownConverterInterface
to reduce noise
2.2.0 - 2022-01-22
Added
- Added new
ConverterInterface
- Added new
MarkdownToXmlConverter
class - Added new
HtmlDecorator
class which can wrap existing renderers with additional HTML tags - Added new
table/wrap
config to apply an optional wrapping/container element around a table (#780)
Changed
HtmlElement
contents can now consist of anyStringable
, not justHtmlElement
andstring
Deprecated
- Deprecated
MarkdownConverterInterface
and itsconvertToHtml()
method; useConverterInterface
andconvert()
instead
2.1.1 - 2022-01-02
Added
- Added missing return type to
Environment::dispatch()
to fix deprecation warning (#778)
2.1.0 - 2021-12-05
Added
- Added support for ext-yaml in FrontMatterExtension (#715)
- Added support for symfony/yaml v6.0 in FrontMatterExtension (#739)
- Added new
heading_permalink/aria_hidden
config option (#741)
Fixed
- Fixed PHP 8.1 deprecation warning (#759, #762)
Older Versions
Please see the full list of releases for the complete changelog.