You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-**Added new `XmlRenderer` to simplify AST debugging** ([see documentation](https://commonmark.thephpleague.com/xml/)) (#431)
18
+
-**Added the ability to configure disallowed raw HTML tags** (#507)
19
+
-**Added the ability for Mentions to use multiple characters for their symbol** (#514, #550)
20
+
-**Added the ability to delegate event dispatching to PSR-14 compliant event dispatcher libraries**
21
+
-**Added new configuration options:**
22
+
- Added `heading_permalink/min_heading_level` and `heading_permalink/max_heading_level` options to control which headings get permalinks (#519)
23
+
- Added `heading_permalink/fragment_prefix` to allow customizing the URL fragment prefix (#602)
24
+
- Added `footnote/backref_symbol` option for customizing backreference link appearance (#522)
25
+
- Added `slug_normalizer/max_length` option to control the maximum length of generated URL slugs
26
+
- Added `slug_normalizer/unique` option to control whether unique slugs should be generated per-document or per-environment
27
+
-**Added purity markers throughout the codebase** (verified with Psalm)
17
28
- Added `Query` class to simplify Node traversal when looking to take action on certain Nodes
18
-
- Added the ability to delegate event dispatching to PSR-14 compliant event dispatcher libraries
19
-
- Added the ability to configure disallowed raw HTML tags (#507)
20
-
- Added the ability for Mentions to use multiple characters for their symbol (#514, #550)
21
-
- Added `heading_permalink/min_heading_level` and `heading_permalink/max_heading_level` options to control which headings get permalinks (#519)
22
-
- Added `heading_permalink/fragment_prefix` to allow customizing the URL fragment prefix (#602)
23
-
- Added `footnote/backref_symbol` option for customizing backreference link appearance (#522)
24
-
- Added `slug_normalizer/max_length` option to control the maximum length of generated URL slugs
25
-
- Added `slug_normalizer/unique` option to control whether unique slugs should be generated per-document or per-environment
26
29
- Added new `HtmlFilter` and `StringContainerHelper` utility classes
27
30
- Added new `AbstractBlockContinueParser` class to simplify the creation of custom block parsers
28
31
- Added several new classes and interfaces:
@@ -82,15 +85,15 @@ See <https://commonmark.thephpleague.com/2.0/upgrading/> for detailed informatio
82
85
-`TableCell::setType()`
83
86
-`TableCell::getAlign()`
84
87
-`TableCell::setAlign()`
85
-
- Added purity markers throughout the codebase (verified with Psalm)
86
88
87
89
### Changed
88
90
89
-
-`CommonMarkConverter::convertToHtml()` now returns an instance of `RenderedContentInterface`. This can be cast to a string for backward compatibility with 1.x.
90
-
- Table of Contents items are no longer wrapped with `<p>` tags (#613)
91
-
- Heading Permalinks now link to element IDs instead of using `name` attributes (#602)
92
-
- Heading Permalink IDs and URL fragments now have a `content` prefix by default (#602)
93
-
- Changes to configuration options:
91
+
-**Changed the converter return type**
92
+
-`CommonMarkConverter::convertToHtml()` now returns an instance of `RenderedContentInterface`. This can be cast to a string for backward compatibility with 1.x.
93
+
-**Table of Contents items are no longer wrapped with `<p>` tags** (#613)
94
+
-**Heading Permalinks now link to element IDs instead of using `name` attributes** (#602)
95
+
-**Heading Permalink IDs and URL fragments now have a `content` prefix by default** (#602)
96
+
-**Changes to configuration options:**
94
97
-`enable_em` has been renamed to `commonmark/enable_em`
95
98
-`enable_strong` has been renamed to `commonmark/enable_strong`
96
99
-`use_asterisk` has been renamed to `commonmark/use_asterisk`
@@ -100,31 +103,32 @@ See <https://commonmark.thephpleague.com/2.0/upgrading/> for detailed informatio
100
103
-`mentions/*/regex` has been renamed to `mentions/*/pattern` and requires partial regular expressions (without delimiters or flags)
101
104
-`max_nesting_level` now defaults to `PHP_INT_MAX` and no longer supports floats
102
105
-`heading_permalink/slug_normalizer` has been renamed to `slug_normalizer/instance`
103
-
- Event dispatching is now fully PSR-14 compliant
106
+
-**Event dispatching is now fully PSR-14 compliant**
107
+
-**Moved and renamed several classes** - [see the full list here](https://commonmark.thephpleague.com/2.0/upgrading/#classesnamespaces-renamed)
104
108
- The `HeadingPermalinkExtension` and `FootnoteExtension` were modified to ensure they never produce a slug which conflicts with slugs created by the other extension
105
109
-`SlugNormalizer::normalizer()` now supports optional prefixes and max length options passed in via the `$context` argument
106
110
- The `AbstractBlock::$data` and `AbstractInline::$data` arrays were replaced with a `Data` array-like object on the base `Node` class
107
-
- Moved and renamed several classes - [see the full list here](https://commonmark.thephpleague.com/2.0/upgrading/#classesnamespaces-renamed)
108
-
- Implemented a new approach to block parsing. This was a massive change, so here are the highlights:
111
+
-**Implemented a new approach to block parsing.** This was a massive change, so here are the highlights:
109
112
- Functionality previously found in block parsers and node elements has moved to block parser factories and block parsers, respectively ([more details](https://commonmark.thephpleague.com/2.0/upgrading/#new-block-parsing-approach))
110
113
-`ConfigurableEnvironmentInterface::addBlockParser()` is now `EnvironmentBuilderInterface::addBlockParserFactory()`
111
114
-`ReferenceParser` was re-implemented and works completely different than before
112
115
- The paragraph parser no longer needs to be added manually to the environment
113
-
- 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):
116
+
-**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):
114
117
-`InlineParserInterface::getCharacters()` is now `getMatchDefinition()` and returns an instance of `InlineParserMatch`
115
118
-`InlineParserContext::__construct()` now requires the contents to be provided as a `Cursor` instead of a `string`
116
-
- Implemented delimiter parsing as a special type of inline parser (via the new `DelimiterParser` class)
117
-
- Changed block and inline rendering to use common methods and interfaces
119
+
-**Implemented delimiter parsing as a special type of inline parser** (via the new `DelimiterParser` class)
120
+
-**Changed block and inline rendering to use common methods and interfaces**
118
121
-`BlockRendererInterface` and `InlineRendererInterface` were replaced by `NodeRendererInterface` with slightly different parameters. All core renderers now implement this interface.
119
122
-`ConfigurableEnvironmentInterface::addBlockRenderer()` and `addInlineRenderer()` were combined into `EnvironmentBuilderInterface::addRenderer()`
120
123
-`EnvironmentInterface::getBlockRenderersForClass()` and `getInlineRenderersForClass()` are now just `getRenderersForClass()`
121
-
- Completely refactored the Configuration implementation
124
+
-**Completely refactored the Configuration implementation**
122
125
- All configuration-specific classes have been moved into a new `league/config` package with a new namespace
123
126
-`Configuration` objects must now be configured with a schema and all options must match that schema - arbitrary keys are no longer permitted
124
127
-`Configuration::__construct()` no longer accepts the default configuration values - use `Configuration::merge()` instead
125
128
-`ConfigurationInterface` now only contains a `get(string $key)`; this method no longer allows arbitrary default values to be returned if the option is missing
126
129
-`ConfigurableEnvironmentInterface` was renamed to `EnvironmentBuilderInterface`
127
130
-`ExtensionInterface::register()` now requires an `EnvironmentBuilderInterface` param instead of `ConfigurableEnvironmentInterface`
131
+
-**Added missing return types to virtually every class and interface method**
128
132
- Re-implemented the GFM Autolink extension using the new inline parser approach instead of document processors
129
133
-`EmailAutolinkProcessor` is now `EmailAutolinkParser`
130
134
-`UrlAutolinkProcessor` is now `UrlAutolinkParser`
@@ -155,7 +159,6 @@ See <https://commonmark.thephpleague.com/2.0/upgrading/> for detailed informatio
155
159
-`TableCell::$align` is now `private`
156
160
-`TableCell::$type` is now `private`
157
161
-`TableSection::$type` is now `private`
158
-
- Added missing return types to virtually every class and interface method
159
162
- Several methods which previously returned `$this` now return `void`
160
163
-`Delimiter::setPrevious()`
161
164
-`Node::replaceChildren()`
@@ -196,23 +199,23 @@ See <https://commonmark.thephpleague.com/2.0/upgrading/> for detailed informatio
196
199
-`DelimiterProcessorCollectionInterface` now extends `Countable`
197
200
-`RegexHelper::PARTIAL_` constants must always be used in case-insensitive contexts
198
201
-`HeadingPermalinkProcessor` no longer accepts text normalizers via the constructor - these must be provided via configuration instead
199
-
-Block which can't contain inlines will no longer be asked to render inlines
202
+
-Blocks which can't contain inlines will no longer be asked to render inlines
200
203
-`AnonymousFootnoteRefParser` and `HeadingPermalinkProcessor` now implement `EnvironmentAwareInterface` instead of `ConfigurationAwareInterface`
201
204
- The second argument to `TextNormalizerInterface::normalize()` must now be an array
202
205
- The `title` attribute for `Link` and `Image` nodes is now stored using a dedicated property instead of stashing it in `$data`
203
206
-`ListData::$delimiter` now returns either `ListBlock::DELIM_PERIOD` or `ListBlock::DELIM_PAREN` instead of the literal delimiter
204
207
205
208
### Fixed
206
209
207
-
- Fixed parsing of footnotes without content
208
-
- Fixed rendering of orphaned footnotes and footnote refs
209
-
- Fixed some URL autolinks breaking too early (#492)
210
+
-**Fixed parsing of footnotes without content**
211
+
-**Fixed rendering of orphaned footnotes and footnote refs**
212
+
-**Fixed some URL autolinks breaking too early** (#492)
210
213
- Fixed `AbstractStringContainer` not actually being `abstract`
211
214
212
215
### Removed
213
216
214
-
- Removed support for PHP 7.1, 7.2, and 7.3 (#625, #671)
215
-
- Removed all previously-deprecated functionality:
217
+
-**Removed support for PHP 7.1, 7.2, and 7.3** (#625, #671)
218
+
-**Removed all previously-deprecated functionality:**
216
219
- Removed the ability to pass custom `Environment` instances into the `CommonMarkConverter` and `GithubFlavoredMarkdownConverter` constructors
217
220
- Removed the `Converter` class and `ConverterInterface`
218
221
- Removed the `bin/commonmark` script
@@ -235,7 +238,7 @@ See <https://commonmark.thephpleague.com/2.0/upgrading/> for detailed informatio
235
238
- Removed the `CommonMarkConverter::VERSION` constant
236
239
- Removed the `HeadingPermalinkRenderer::DEFAULT_INNER_CONTENTS` constant
237
240
- Removed the `heading_permalink/inner_contents` configuration option
238
-
- Removed now-unused classes:
241
+
-**Removed now-unused classes:**
239
242
-`AbstractStringContainerBlock`
240
243
-`BlockRendererInterface`
241
244
-`Context`
@@ -277,7 +280,7 @@ See <https://commonmark.thephpleague.com/2.0/upgrading/> for detailed informatio
277
280
278
281
### Deprecated
279
282
280
-
The following things have been deprecated and will not be supported in v3.0:
283
+
**The following things have been deprecated and will not be supported in v3.0:**
281
284
282
285
-`Environment::mergeConfig()` (set configuration before instantiation instead)
283
286
-`Environment::createCommonMarkEnvironment()` and `Environment::createGFMEnvironment()`
0 commit comments