33 KiB
		
	
	
	
	
			
		
		
	
	
			33 KiB
		
	
	
	
	
Change Log
All notable changes to this project will be documented in this file. Updates should follow the Keep a CHANGELOG principles.
Upgrading from 1.x? See https://commonmark.thephpleague.com/2.0/upgrading/ for additional information.
Unreleased
2.6.1 - 2024-12-29
Fixed
2.6.0 - 2024-12-07
This is a security release to address potential denial of service attacks when parsing specially crafted, malicious input from untrusted sources (like user input).
Added
- Added max_delimiters_per_lineconfig option to prevent denial of service attacks when parsing malicious input
- Added table/max_autocompleted_cellsconfig option to prevent denial of service attacks when parsing large tables
- The AttributesExtensionnow supports attributes without values (#985, #986)
- The AutolinkExtensionexposes two new configuration options to override the default behavior (#969, #987):- autolink/allowed_protocols- an array of protocols to allow autolinking for
- autolink/default_protocol- the default protocol to use when none is specified
 
- Added RegexHelper::isWhitespace()method to check if a given character is an ASCII whitespace character
- Added CacheableDelimiterProcessorInterfaceto ensure linear complexity for dynamic delimiter processing
- Added Bracketdelimiter type to optimize bracket parsing
Changed
- [and- ]are no longer added as- Delimiterobjects on the stack; a new- Brackettype with its own stack is used instead
- UrlAutolinkParserno longer parses URLs with more than 127 subdomains
- Expanded reference links can no longer exceed 100kb, or the size of the input document (whichever is greater)
- Delimiters should always provide a non-null value via DelimiterInterface::getIndex()- We'll attempt to infer the index based on surrounding delimiters where possible
 
- The DelimiterStacknow accepts integer positions for any$stackBottomargument
- Several small performance optimizations
2.5.3 - 2024-08-16
Changed
- Made compatible with CommonMark spec 0.31.1, including:
- Remove source, addsearchto list of recognized block tags
 
- Remove 
2.5.2 - 2024-08-14
Changed
- Boolean attributes now require an explicit truevalue (#1040)
Fixed
- Fixed regression where text could be misinterpreted as an attribute (#1040)
2.5.1 - 2024-07-24
Fixed
- Fixed attribute parsing incorrectly parsing mustache-like syntax (#1035)
- Fixed incorrect Tablestart line numbers (#1037)
2.5.0 - 2024-07-22
Added
- The AttributesExtensionnow supports attributes without values (#985, #986)
- The AutolinkExtensionexposes two new configuration options to override the default behavior (#969, #987):- autolink/allowed_protocols- an array of protocols to allow autolinking for
- autolink/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
 
- Paragraphs only containing link reference definitions will be kept in the AST until the- Documentis 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
2.4.4 - 2024-07-22
Fixed
- Fixed SmartPunct extension changing already-formatted quotation marks (#1030)
2.4.3 - 2024-07-22
Fixed
- Fixed the Attributes extension not supporting CSS level 3 selectors (#1013)
- Fixed UrlAutolinkParserincorrectly parsing text containingwwwanywhere before an autolink (#1025)
2.4.2 - 2024-02-02
Fixed
- Fixed declaration parser being too strict
- FencedCodeRenderer: don't add- language-to class if already prefixed
Deprecated
- Returning dynamic values from DelimiterProcessorInterface::getDelimiterUse()is deprecated- You should instead implement CacheableDelimiterProcessorInterfaceto help the engine perform caching to avoid performance issues.
 
- You should instead implement 
- Failing to set a delimiter's index (or returning nullfromDelimiterInterface::getIndex()) is deprecated and will not be supported in 3.0
- Deprecated DelimiterInterface::isActive()andDelimiterInterface::setActive(), as these are no longer used by the engine
- Deprecated DelimiterStack::removeEarlierMatches()andDelimiterStack::searchByCharacter(), as these are no longer used by the engine
- Passing a DelimiterInterfaceas the$stackBottomargument toDelimiterStack::processDelimiters()or::removeAll()is deprecated and will not be supported in 3.0; pass the integer position instead.
Fixed
- Fixed NUL characters not being replaced in the input
- Fixed quadratic complexity parsing unclosed inline links
- Fixed quadratic complexity parsing emphasis and strikethrough delimiters
- Fixed issue where having 500,000+ delimiters could trigger a known segmentation fault issue in PHP's garbage collection
- Fixed quadratic complexity deactivating link openers
- Fixed quadratic complexity parsing long backtick code spans with no matching closers
- Fixed catastrophic backtracking when parsing link labels/titles
2.4.1 - 2023-08-30
Fixed
- Fixed ExternalLinkProcessornot fully disabling therelattribute when configured to do so (#992)
2.4.0 - 2023-03-24
Added
- Added generic CommonMarkExceptionmarker 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- idattribute 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- noneto 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 value
- MarkdownParserwhen 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 throws- InvalidConfigurationExceptioninstead of- RuntimeExceptionwhen 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 - 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-03
Fixed
- Fixed TaskListItemMarkerRenderernot 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 InlineParserEnginewhen 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 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)
2.3.3 - 2022-06-07
Fixed
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 DocumentRendererInterfaceas a replacement for the now-deprecatedMarkdownRendererInterface
Deprecated
- Deprecated MarkdownRendererInterface; useDocumentRendererInterfaceinstead
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.0.4 - 2022-02-26
Fixed
- Fixed front matter parsing with Windows line endings (#821)
2.2.2 - 2022-02-13
Fixed
2.2.1 - 2022-01-25
Fixed
- Fixed symfony/deprecation-contractsconstraint
Removed
- Removed deprecation trigger from MarkdownConverterInterfaceto reduce noise
2.2.0 - 2022-01-22
Added
- Added new ConverterInterface
- Added new MarkdownToXmlConverterclass
- Added new HtmlDecoratorclass which can wrap existing renderers with additional HTML tags
- Added new table/wrapconfig to apply an optional wrapping/container element around a table (#780)
Changed
- HtmlElementcontents can now consist of any- Stringable, not just- HtmlElementand- string
Deprecated
- Deprecated MarkdownConverterInterfaceand itsconvertToHtml()method; useConverterInterfaceandconvert()instead
2.1.2 - 2022-02-13
Fixed
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_hiddenconfig option (#741)
Fixed
2.0.3 - 2022-02-13
Fixed
2.0.2 - 2021-08-14
Changed
- Bumped minimum version of league/config to support PHP 8.1
Fixed
- Fixed ability to register block parsers that identify lines starting with letters (#706)
2.0.1 - 2021-07-31
Fixed
- Fixed nested autolinks (#689)
- Fixed description lists being parsed incorrectly (#692)
- Fixed Table of Contents not respecting Heading Permalink prefixes (#690)
2.0.0 - 2021-07-24
No changes were introduced since the previous RC2 release. See all entries below for a list of changes between 1.x and 2.0.
2.0.0-rc2 - 2021-07-17
Fixed
- Fixed Mentions inside of links creating nested links against the spec's rules (#688)
2.0.0-rc1 - 2021-07-10
No changes were introduced since the previous release.
2.0.0-beta3 - 2021-07-03
Changed
- Any leading UTF-8 BOM will be stripped from the input
- The getEnvironment()method ofCommonMarkConverterandGithubFlavoredMarkdownConverterwill always return the concrete, configurableEnvironmentfor upgrading convenience
- Optimized AST iteration
- Lots of small micro-optimizations
2.0.0-beta2 - 2021-06-27
Added
Changed
- Made compatible with CommonMark spec 0.30.0
- Optimized link label parsing
- Optimized AST iteration for a 50% performance boost in some event listeners (#683, #684)
Fixed
- Fixed processing instructions with EOLs
- Fixed case-insensitive matching for HTML tag types
- Fixed type 7 HTML blocks incorrectly interrupting lazy paragraphs
- Fixed newlines in reference labels not collapsing into spaces
- Fixed link label normalization with escaped newlines
- Fixed unnecessary AST iteration when no default attributes are configured
2.0.0-beta1 - 2021-06-20
Added
- Added three new extensions:
- FrontMatterExtension(see documentation)
- DescriptionListExtension(see documentation)
- DefaultAttributesExtension(see documentation)
 
- Added new XmlRendererto simplify AST debugging (see documentation) (#431)
- Added the ability to configure disallowed raw HTML tags (#507)
- Added the ability for Mentions to use multiple characters for their symbol (#514, #550)
- Added the ability to delegate event dispatching to PSR-14 compliant event dispatcher libraries
- Added new configuration options:
- Added heading_permalink/min_heading_levelandheading_permalink/max_heading_leveloptions to control which headings get permalinks (#519)
- Added heading_permalink/fragment_prefixto allow customizing the URL fragment prefix (#602)
- Added footnote/backref_symboloption for customizing backreference link appearance (#522)
- Added slug_normalizer/max_lengthoption to control the maximum length of generated URL slugs
- Added slug_normalizer/uniqueoption to control whether unique slugs should be generated per-document or per-environment
 
- Added 
- Added purity markers throughout the codebase (verified with Psalm)
- Added Queryclass to simplify Node traversal when looking to take action on certain Nodes
- Added new HtmlFilterandStringContainerHelperutility classes
- Added new AbstractBlockContinueParserclass to simplify the creation of custom block parsers
- Added several new classes and interfaces:
- BlockContinue
- BlockContinueParserInterface
- BlockContinueParserWithInlinesInterface
- BlockStart
- BlockStartParserInterface
- ChildNodeRendererInterface
- ConfigurableExtensionInterface
- CursorState
- DashParser(extracted from- PunctuationParser)
- DelimiterParser
- DocumentBlockParser
- DocumentPreRenderEvent
- DocumentRenderedEvent
- EllipsesParser(extracted from- PunctuationParser)
- ExpressionInterface
- FallbackNodeXmlRenderer
- InlineParserEngineInterface
- InlineParserMatch
- MarkdownParserState
- MarkdownParserStateInterface
- MarkdownRendererInterface
- Query
- RawMarkupContainerInterface
- ReferenceableInterface
- RenderedContent
- RenderedContentInterface
- ReplaceUnpairedQuotesListener
- SpecReader
- TableOfContentsRenderer
- UniqueSlugNormalizer
- UniqueSlugNormalizerInterface
- XmlRenderer
- XmlNodeRendererInterface
 
- Added several new methods:
- Cursor::getCurrentCharacter()
- Environment::createDefaultConfiguration()
- Environment::setEventDispatcher()
- EnvironmentInterface::getExtensions()
- EnvironmentInterface::getInlineParsers()
- EnvironmentInterface::getSlugNormalizer()
- FencedCode::setInfo()
- Heading::setLevel()
- HtmlRenderer::renderDocument()
- InlineParserContext::getFullMatch()
- InlineParserContext::getFullMatchLength()
- InlineParserContext::getMatches()
- InlineParserContext::getSubMatches()
- LinkParserHelper::parsePartialLinkLabel()
- LinkParserHelper::parsePartialLinkTitle()
- Node::assertInstanceOf()
- RegexHelper::isLetter()
- StringContainerInterface::setLiteral()
- TableCell::getType()
- TableCell::setType()
- TableCell::getAlign()
- TableCell::setAlign()
 
Changed
- Changed the converter return type
- CommonMarkConverter::convertToHtml()now returns an instance of- RenderedContentInterface. This can be cast to a string for backward compatibility with 1.x.
 
- Table of Contents items are no longer wrapped with <p>tags (#613)
- Heading Permalinks now link to element IDs instead of using nameattributes (#602)
- Heading Permalink IDs and URL fragments now have a contentprefix by default (#602)
- Changes to configuration options:
- enable_emhas been renamed to- commonmark/enable_em
- enable_stronghas been renamed to- commonmark/enable_strong
- use_asteriskhas been renamed to- commonmark/use_asterisk
- use_underscorehas been renamed to- commonmark/use_underscore
- unordered_list_markershas been renamed to- commonmark/unordered_list_markers
- mentions/*/symbolhas been renamed to- mentions/*/prefix
- mentions/*/regexhas been renamed to- mentions/*/patternand requires partial regular expressions (without delimiters or flags)
- max_nesting_levelnow defaults to- PHP_INT_MAXand no longer supports floats
- heading_permalink/slug_normalizerhas been renamed to- slug_normalizer/instance
 
- Event dispatching is now fully PSR-14 compliant
- Moved and renamed several classes - see the full list here
- The HeadingPermalinkExtensionandFootnoteExtensionwere modified to ensure they never produce a slug which conflicts with slugs created by the other extension
- SlugNormalizer::normalizer()now supports optional prefixes and max length options passed in via the- $contextargument
- The AbstractBlock::$dataandAbstractInline::$dataarrays were replaced with aDataarray-like object on the baseNodeclass
- Implemented a new approach to block parsing. This was a massive change, so here are the highlights:
- Functionality previously found in block parsers and node elements has moved to block parser factories and block parsers, respectively (more details)
- ConfigurableEnvironmentInterface::addBlockParser()is now- EnvironmentBuilderInterface::addBlockParserFactory()
- ReferenceParserwas re-implemented and works completely different than before
- The paragraph parser no longer needs to be added manually to the environment
 
- Implemented a new approach to inline parsing where parsers can now specify longer strings or regular expressions they want to parse (instead of just single characters):
- InlineParserInterface::getCharacters()is now- getMatchDefinition()and returns an instance of- InlineParserMatch
- InlineParserContext::__construct()now requires the contents to be provided as a- Cursorinstead of a- string
 
- Implemented delimiter parsing as a special type of inline parser (via the new DelimiterParserclass)
- Changed block and inline rendering to use common methods and interfaces
- BlockRendererInterfaceand- InlineRendererInterfacewere replaced by- NodeRendererInterfacewith slightly different parameters. All core renderers now implement this interface.
- ConfigurableEnvironmentInterface::addBlockRenderer()and- addInlineRenderer()were combined into- EnvironmentBuilderInterface::addRenderer()
- EnvironmentInterface::getBlockRenderersForClass()and- getInlineRenderersForClass()are now just- getRenderersForClass()
 
- Completely refactored the Configuration implementation
- All configuration-specific classes have been moved into a new league/configpackage with a new namespace
- Configurationobjects must now be configured with a schema and all options must match that schema - arbitrary keys are no longer permitted
- Configuration::__construct()no longer accepts the default configuration values - use- Configuration::merge()instead
- ConfigurationInterfacenow only contains a- get(string $key); this method no longer allows arbitrary default values to be returned if the option is missing
- ConfigurableEnvironmentInterfacewas renamed to- EnvironmentBuilderInterface
- ExtensionInterface::register()now requires an- EnvironmentBuilderInterfaceparam instead of- ConfigurableEnvironmentInterface
 
- All configuration-specific classes have been moved into a new 
- Added missing return types to virtually every class and interface method
- Re-implemented the GFM Autolink extension using the new inline parser approach instead of document processors
- EmailAutolinkProcessoris now- EmailAutolinkParser
- UrlAutolinkProcessoris now- UrlAutolinkParser
 
- HtmlElementcan now properly handle array (i.e.- class) and boolean (i.e.- checked) attribute values
- HtmlElementautomatically flattens any attributes with array values into space-separated strings, removing duplicate entries
- Combined separate classes/interfaces into one:
- DisallowedRawHtmlRendererreplaces- DisallowedRawHtmlBlockRendererand- DisallowedRawHtmlInlineRenderer
- NodeRendererInterfacereplaces- BlockRendererInterfaceand- InlineRendererInterface
 
- Renamed the following methods:
- Environmentand- ConfigurableEnvironmentInterface:- addBlockParser()is now- addBlockStartParser()
 
- ReferenceMapand- ReferenceMapInterface:- addReference()is now- add()
- getReference()is now- get()
- listReferences()is now- getIterator()
 
- Various node (block/inline) classes:
- getContent()is now- getLiteral()
- setContent()is now- setLiteral()
 
 
- Moved and renamed the following constants:
- EnvironmentInterface::HTML_INPUT_ALLOWis now- HtmlFilter::ALLOW
- EnvironmentInterface::HTML_INPUT_ESCAPEis now- HtmlFilter::ESCAPE
- EnvironmentInterface::HTML_INPUT_STRIPis now- HtmlFilter::STRIP
- TableCell::TYPE_HEADis now- TableCell::TYPE_HEADER
- TableCell::TYPE_BODYis now- TableCell::TYPE_DATA
 
- Changed the visibility of the following properties:
- AttributesInline::$attributesis now- private
- AttributesInline::$blockis now- private
- TableCell::$alignis now- private
- TableCell::$typeis now- private
- TableSection::$typeis now- private
 
- Several methods which previously returned $thisnow returnvoid- Delimiter::setPrevious()
- Node::replaceChildren()
- Context::setTip()
- Context::setContainer()
- Context::setBlocksParsed()
- AbstractStringContainer::setContent()
- AbstractWebResource::setUrl()
 
- Several classes are now marked final:- ArrayCollection
- Emphasis
- FencedCode
- Heading
- HtmlBlock
- HtmlElement
- HtmlInline
- IndentedCode
- Newline
- Strikethrough
- Strong
- Text
 
- Headingnodes no longer directly contain a copy of their inner text
- StringContainerInterfacecan now be used for inlines, not just blocks
- ArrayCollectiononly supports integer keys
- HtmlElementnow implements- Stringable
- Cursor::saveState()and- Cursor::restoreState()now use- CursorStateobjects instead of arrays
- NodeWalker::next()now enters, traverses any children, and leaves all elements which may have children (basically all blocks plus any inlines with children). Previously, it only did this for elements explicitly marked as "containers".
- InvalidOptionExceptionwas removed
- Anything with a getReference(): ReferenceInterfacemethod now implementsReferencableInterface
- The SmartPunctextension now replaces all unpairedQuoteelements withTextelements towards the end of parsing, making theQuoteRendererunnecessary
- Several changes made to the Footnote extension:
- Footnote identifiers can no longer contain spaces
- Anonymous footnotes can now span subsequent lines
- Footnotes can now contain multiple lines of content, including sub-blocks, by indenting them
- Footnote event listeners now have numbered priorities (but still execute in the same order)
- Footnotes must now be separated from previous content by a blank line
 
- The line numbers (keys) returned via MarkdownInput::getLines()now start at 1 instead of 0
- DelimiterProcessorCollectionInterfacenow extends- Countable
- RegexHelper::PARTIAL_constants must always be used in case-insensitive contexts
- HeadingPermalinkProcessorno longer accepts text normalizers via the constructor - these must be provided via configuration instead
- Blocks which can't contain inlines will no longer be asked to render inlines
- AnonymousFootnoteRefParserand- HeadingPermalinkProcessornow implement- EnvironmentAwareInterfaceinstead of- ConfigurationAwareInterface
- The second argument to TextNormalizerInterface::normalize()must now be an array
- The titleattribute forLinkandImagenodes is now stored using a dedicated property instead of stashing it in$data
- ListData::$delimiternow returns either- ListBlock::DELIM_PERIODor- ListBlock::DELIM_PARENinstead of the literal delimiter
Fixed
- Fixed parsing of footnotes without content
- Fixed rendering of orphaned footnotes and footnote refs
- Fixed some URL autolinks breaking too early (#492)
- Fixed AbstractStringContainernot actually beingabstract
Removed
- Removed support for PHP 7.1, 7.2, and 7.3 (#625, #671)
- Removed all previously-deprecated functionality:
- Removed the ability to pass custom Environmentinstances into theCommonMarkConverterandGithubFlavoredMarkdownConverterconstructors
- Removed the Converterclass andConverterInterface
- Removed the bin/commonmarkscript
- Removed the Html5Entitiesutility class
- Removed the InlineMentionParser(useMentionParserinstead)
- Removed DefaultSlugGeneratorandSlugGeneratorInterfacefrom theExtension/HeadingPermalink/Slugsub-namespace (use the new ones under./SlugGeneratorinstead)
- Removed the following ArrayCollectionmethods:- add()
- set()
- get()
- remove()
- isEmpty()
- contains()
- indexOf()
- containsKey()
- replaceWith()
- removeGaps()
 
- Removed the ConfigurableEnvironmentInterface::setConfig()method
- Removed the ListBlock::TYPE_UNORDEREDconstant
- Removed the CommonMarkConverter::VERSIONconstant
- Removed the HeadingPermalinkRenderer::DEFAULT_INNER_CONTENTSconstant
- Removed the heading_permalink/inner_contentsconfiguration option
 
- Removed the ability to pass custom 
- Removed now-unused classes:
- AbstractStringContainerBlock
- BlockRendererInterface
- Context
- ContextInterface
- Converter
- ConverterInterface
- InlineRendererInterface
- PunctuationParser(was split into two classes:- DashParserand- EllipsesParser)
- QuoteRenderer
- UnmatchedBlockCloser
 
- Removed the following methods, properties, and constants:
- AbstractBlock::$open
- AbstractBlock::$lastLineBlank
- AbstractBlock::isContainer()
- AbstractBlock::canContain()
- AbstractBlock::isCode()
- AbstractBlock::matchesNextLine()
- AbstractBlock::endsWithBlankLine()
- AbstractBlock::setLastLineBlank()
- AbstractBlock::shouldLastLineBeBlank()
- AbstractBlock::isOpen()
- AbstractBlock::finalize()
- AbstractBlock::getData()
- AbstractInline::getData()
- ConfigurableEnvironmentInterface::addBlockParser()
- ConfigurableEnvironmentInterface::mergeConfig()
- Delimiter::setCanClose()
- EnvironmentInterface::getConfig()
- EnvironmentInterface::getInlineParsersForCharacter()
- EnvironmentInterface::getInlineParserCharacterRegex()
- HtmlRenderer::renderBlock()
- HtmlRenderer::renderBlocks()
- HtmlRenderer::renderInline()
- HtmlRenderer::renderInlines()
- Node::isContainer()
- RegexHelper::matchAll()(use the new- matchFirst()method instead)
- RegexHelper::REGEX_WHITESPACE
 
- Removed the second $contentsargument from theHeadingconstructor
Deprecated
The following things have been deprecated and will not be supported in v3.0:
- Environment::mergeConfig()(set configuration before instantiation instead)
- Environment::createCommonMarkEnvironment()and- Environment::createGFMEnvironment()- Alternative 1: Use CommonMarkConverterorGithubFlavoredMarkdownConverterif you don't need to customize the environment
- Alternative 2: Instantiate a new Environmentand add the necessary extensions yourself
 
- Alternative 1: Use