Releases: thephpleague/commonmark
Releases · thephpleague/commonmark
2.4.3
Fixed
- Fixed the Attributes extension not supporting CSS level 3 selectors (#1013)
- Fixed
UrlAutolinkParserincorrectly parsing text containingwwwanywhere before an autolink (#1025)
New Contributors
- @nfreader made their first contribution in #1016
- @macbookandrew made their first contribution in #1025
- @xavierlacot made their first contribution in #1013
Full Changelog: 2.4.2...2.4.3
2.4.2
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 #997
- @clustermin made their first contribution in #988
- @peter279k made their first contribution in #996
Full Changelog: 2.4.1...2.4.2
2.4.1
2.4.0
See the upgrading guide for more information about the exception-related changes
Added
- Added generic
CommonMarkExceptionmarker interface for all exceptions thrown by the library - Added several new specific exception types implementing that marker interface:
AlreadyInitializedExceptionInvalidArgumentExceptionIOExceptionLogicExceptionMissingDependencyExceptionNoMatchingRendererExceptionParserLogicException
- Added more configuration options to the Heading Permalinks extension (#939):
heading_permalink/apply_id_to_heading- Whentrue, theidattribute 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 acceptsnoneto prevent the creation of the<a>link
- Added new
table/alignment_attributesconfiguration option to control how table cell alignment is rendered (#959)
Changed
- Change several thrown exceptions from
RuntimeExceptiontoLogicException(or something extending it), including:CallbackGenerators that fail to set a URL or return an expected valueMarkdownParserwhen 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
Nodewhen no renderer has been registered for it
HeadingPermalinkProcessornow throwsInvalidConfigurationExceptioninstead ofRuntimeExceptionwhen 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
@throwsdocblocks throughout the codebase, includingConverterInterface,MarkdownConverter, andMarkdownConverterInterface.- These previously suggested that only
\RuntimeExceptions were thrown, which was inaccurate as\LogicExceptions were also possible.
- These previously suggested that only
2.3.9
2.3.8
2.3.7
2.3.6
2.3.5
2.3.4
Changed
- Made a number of small tweaks to the embed extension's parsing behavior to fix #898:
- Changed
EmbedStartParserto always capture embed-like lines in container blocks, regardless of parent block type - Changed
EmbedProcessorto also removeEmbedblocks that aren't direct children of theDocument - Increased the priority of
EmbedProcessorto1010
- Changed
Fixed
- Fixed
EmbedExtensionnot parsing embeds following a list block (#898)