1# Change Log
2All notable changes to this project will be documented in this file.
3Updates should follow the [Keep a CHANGELOG](https://keepachangelog.com/) principles.
4
5## [0.19.3] - 2019-06-18
6
7### Fixed
8
9 - Fixed bug where elements with content of `"0"` wouldn't be rendered (#376)
10
11## [0.19.2] - 2019-05-19
12
13### Fixed
14
15 - Fixed bug where default values for nested configuration paths were inadvertently cast to strings
16
17## [0.19.1] - 2019-04-10
18
19### Added
20
21 - Added the missing `addExtension()` method to the new `ConfigurableEnvironmentInterface`
22
23### Fixed
24
25 - Fixed extensions not being able to register other extensions
26
27## [0.19.0] - 2019-04-10
28
29### Added
30
31 - The priority of parsers, processors, and renderers can now be set when `add()`ing them; you no longer need to rely on the order in which they are added
32 - Added support for trying multiple parsers per block/inline
33 - Extracted two new base interfaces from `Environment`:
34   - `EnvironmentInterface`
35   - `ConfigurableEnvironmentInterface`
36 - Extracted a new `AbstractStringContainerBlock` base class and corresponding `StringContainerInterface` from `AbstractBlock`
37 - Added `Cursor::getEncoding()` method
38 - Added `.phpstorm.meta.php` file for better IDE code completion
39 - Made some minor optimizations here and there
40
41### Changed
42
43 - Pretty much everything now has parameter and return types (#346)
44 - Attributes passed to `HtmlElement` will now be escaped by default
45 - `Environment` is now a `final` class
46 - `Environment::getBlockRendererForClass()` was replaced with `Environment::getBlockRenderersForClass()` (note the added `s`)
47 - `Environment::getInlineRendererForClass()` was replaced with `Environment::getInlineRenderersForClass()` (note the added `s`)
48 - The `Environment::get____()` methods now return an iterator instead of an array
49 - `Context::addBlock()` no longer returns the same block instance you passed into the method, as this served no useful purpose
50 - `RegexHelper::isEscapable()` no longer accepts `null` values
51 - `Node::replaceChildren()` now accepts any type of `iterable`, not just `array`s
52 - Some block elements now extend `AbstractStringContainerBlock` instead of `AbstractBlock`
53   - `InlineContainerInterface` now extends the new `StringContainerInterface`
54   - The `handleRemainingContents()` method (formerly on `AbstractBlock`, now on `AbstractStringContainerBlock`) is now an `abstract method
55   - The `InlineParserContext` constructor now requires an `AbstractStringContainerBlock` instead of an `AbstractBlock`
56
57### Removed
58
59 - Removed support for PHP 5.6 and 7.0 (#346)
60 - Removed support for `add()`ing parsers with just the target block/inline class name - you need to include the full namespace now
61 - Removed the following unused methods from `Environment`:
62   - `getInlineParser($name)`
63   - `getInlineParsers()`
64   - `createInlineParserEngine()`
65 - Removed the unused `getName()` methods:
66   - `AbstractBlockParser::getName()`
67   - `AbstractInlineParser::getName()`
68   - `BlockParserInterface::getName()`
69   - `InlinerParserInterface::getName()`
70 - Removed the now-useless classes:
71   - `AbstractBlockParser`
72   - `AbstractInlinerParser`
73   - `InlineContainer`
74 - Removed the `AbstractBlock::acceptsLines()` method
75 - Removed the now-useless constructor from `AbstractBlock`
76 - Removed previously-deprecated functionality:
77   - `InlineContainer` class
78   - `RegexHelper::$instance`
79   - `RegexHelper::getInstance()`
80   - `RegexHelper::getPartialRegex()`
81   - `RegexHelper::getHtmlTagRegex()`
82   - `RegexHelper::getLinkTitleRegex()`
83   - `RegexHelper::getLinkDestinationBracesRegex()`
84   - `RegexHelper::getThematicBreakRegex()`
85 - Removed the second `$preserveEntities` parameter from `Xml:escape()`
86
87## [0.18.5] - 2019-03-28
88
89### Fixed
90
91 - Fixed the adjoining `Text` collapser not handling the full tree (thephpleague/commonmark-ext-autolink#10)
92
93## [0.18.4] - 2019-03-23
94
95### Changed
96
97 - Modified how URL normalization decodes certain characters in order to align with the JS library's output
98 - Disallowed unescaped `(` in parenthesized link title
99
100### Fixed
101
102 - Fixed two exponential backtracking issues
103
104## [0.18.3] - 2019-03-21
105
106This is a **security update** release.
107
108### Changed
109
110 - XML/HTML entities in attributes will no longer be preserved when rendering (#353)
111
112### Fixed
113
114 - Fix XSS vulnerability caused by improper preservation of entities when rendering (#353)
115
116### Deprecated
117
118 - Deprecated the `$preserveEntites` argument of `Xml::escape()` for removal in the next release (#353)
119
120## [0.18.2] - 2019-03-16
121
122### Fixed
123
124 - Fixed adjoining `Text` elements not being collapsed after delimiter processing
125
126### Deprecated
127
128 - Deprecated the `CommonmarkConverter::VERSION` constant for removal in 1.0.0
129
130## [0.18.1] - 2018-12-29
131
132This is a **security update** release.
133
134### Fixed
135
136 - Fix XSS vulnerability caused by URL normalization not handling/encoding newlines properly (#337, CVE-2018-20583)
137
138## [0.18.0] - 2018-09-18
139
140### Added
141
142 - Added `ConverterInterface` to `Converter` and `CommonMarkConverter` (#330)
143 - Added `ListItem::getListData()` method (#329)
144
145### Changed
146
147 - Links with `target="_blank"` will also get `rel="noopener noreferrer"` by default (#331)
148 - Implemented several performance optimizations (#324)
149
150## [0.17.5] - 2018-03-29
151
152### Fixed
153
154 - Fixed incorrect version constant value (again)
155 - Fixed release checklist to prevent the above from happening
156 - Fixed incorrect dates in CHANGELOG
157
158## [0.17.4] - 2018-03-28
159
160### Added
161
162 - Added `ListBlock::setTight()` method
163
164## [0.17.3] - 2018-03-26
165
166### Fixed
167
168 - Fixed incorrect version constant value
169
170## [0.17.2] - 2018-03-25
171
172### Added
173
174 - Added new `RegexHelper::isEscapable()` method
175
176### Fixed
177
178 - Fixed spec compliance bug where escaped spaces should not be allowed in link destinations
179
180## [0.17.1] - 2018-03-18
181
182### Added
183
184 - Added a new constant containing the current version: `CommonMarkConverter::VERSION` (#314)
185
186## [0.17.0] - 2017-12-30
187
188This release contains several breaking changes and a minimum PHP version bump - see <UPGRADE.md> for more details.
189
190### Added
191
192 - Added new `max_nesting_level` setting (#243)
193 - Added minor performance optimizations to `Cursor`
194
195### Changed
196
197 - Minimum PHP version is now 5.6.5.
198 - All full and partial regular expressions in `RegexHelper` are now defined as constants instead of being built on-the-fly.
199 - `Cursor::saveState()` now returns an `array` instead of a `CursorState` object.
200 - `Cursor::restoreState()` now accepts an `array` parameter instead of a `CursorState` object.
201 - Saving/restoring the Cursor state no longer tracks things that don't change (like the text content).
202 - `RegexHelper` is now `final`.
203 - References to `InlineContainer` changed to new `InlineContainerInterface` interface.
204 - `MiscExtension::addInlineParser()` and `MiscExtension::addBlockRenderer()` now return `$this` instead of nothing.
205
206### Fixed
207 - Fixed `Reference::normalizeReference()` not properly collapsing whitespace to a single space
208
209### Deprecated
210
211 - `RegexHelper::getInstance()` and all instance (non-static) methods have been deprecated.
212 - The `InlineContainer` interface has been deprecated. Use `InlineContainerInterface` instead.
213
214### Removed
215
216 - Removed support for PHP 5.4 and 5.5.
217 - Removed `CursorState` class
218 - Removed all previous deprecations:
219   - `Cursor::getFirstNonSpacePosition()`
220   - `Cursor::getFirstNonSpaceCharacter()`
221   - `Cursor::advanceWhileMatches()`
222   - `Cursor::advanceToFirstNonSpace()`
223   - `ElementRendererInterface::escape()`
224   - `HtmlRenderer::escape()`
225   - `RegexHelper::REGEX_UNICODE_WHITESPACE`
226   - `RegexHelper::getLinkDestinationRegex()`
227
228## [0.16.0] - 2017-10-30
229
230This release contains breaking changes, several performance improvements, and two deprecations:
231
232### Added
233
234 - Added new `Xml` utility class; moved HTML/XML escaping logic into there (see deprecations below)
235
236### Changed
237
238 - `Environment::getInlineParsersForCharacter()` now returns an empty array (instead of `null`) when no matching parsers are found
239 - Three utility classes are now marked `final`:
240   - `Html5Entities`
241   - `LinkParserHelper`
242   - `UrlEncoder`
243
244### Fixed
245
246 - Improved performance of several methods (for a 10% overall performance boost - #292)
247
248### Deprecated
249
250The following methods were deprecated and are scheduled for removal in 0.17.0 or 1.0.0 (whichever comes first).  See <UPGRADE.md> for more information.
251
252 - `Cursor::advanceWhileMatches()` deprecated; use `Cursor::match()` instead.
253 - `HtmlRenderer::escape()` deprecated; use `Xml::escape()` instead.
254
255### Removed
256
257 - Removed `DelimiterStack::findFirstMatchingOpener()` which was previously deprecated in 0.15.0
258
259## [0.15.7] - 2017-10-26
260
261### Fixed
262
263 - Improved performance of `Cursor::advanceBy()` (for a 16% performance boost)
264
265## [0.15.6] - 2017-08-08
266
267### Fixed
268
269 - Fixed URI normalization not properly encoding/decoding special characters in certain cases (#287)
270
271## [0.15.5] - 2017-08-05
272
273This release bumps spec compliance to 0.28 without breaking changes to the API.
274
275### Added
276
277 - Project is now tested against PHP 7.2
278
279### Changed
280
281 - Bumped CommonMark spec target to 0.28
282 - Changed internal implementation of `LinkParserHelper::parseLinkDestination()` to allow nested parens
283 - Changed precedence of strong/emph when both nestings are possible (rule 14)
284 - Allow tabs before and after ATX closing header
285
286### Fixed
287
288 - Fixed HTML type 6 block regex matching against `<pre>` (it shouldn't) and not matching `<iframe>` (it should)
289 - Fixed reference parser incorrectly handling escaped `]` characters
290 - Fixed "multiple of 3" delimiter run calculations
291
292### Deprecated
293
294An unused constant and static method were deprecated and will be removed in a future release.  See <UPGRADE.md> for more information.
295
296 - Deprecated `RegexHelper::REGEX_UNICODE_WHITESPACE` (no longer used)
297 - Deprecated `RegexHelper::getLinkDestinationRegex()` (no longer used)
298
299## [0.15.4] - 2017-05-09
300
301### Added
302
303 - Added new methods to `Cursor` (#280):
304   - `advanceToNextNonSpaceOrNewline()` - Identical replacement for the (now-deprecated) `advanceToFirstNonSpace()` method
305   - `advanceToNextNonSpaceOrTab()` - Similar replacement for `advanceToFirstNonSpace()` but with proper tab handling
306   - `getNextNonSpaceCharacter()` - Identical replacement for the (now-deprecated) `getFirstNonSpaceCharacter()` method
307   - `getNextNonSpacePosition()` - Identical replacement for the (now-deprecated) `getFirstNonSpacePosition()` method
308 - Added new method to `CursorState` (#280):
309   - `getNextNonSpaceCache()` - Identical replacement for the (now-deprecated) `getFirstNonSpaceCache()` method
310
311### Fixed
312
313 - Fixed duplicate characters in non-intended lines containing tabs (#279)
314
315### Deprecated
316
317**All deprecations listed here will be removed in a future 0.x release.** See [UPGRADE.md](UPGRADE.md) for instructions on preparing your code for the eventual removal of these methods.
318
319 - Deprecated `Cursor::advanceToFirstNonSpace()` (#280)
320   - Use `advanceToNextNonSpaceOrTab()` or `advanceToNextNonSpaceOrNewline()` instead, depending on your requirements
321 - Deprecated `Cursor::getFirstNonSpaceCharacter()` (#280)
322   - Use `Cursor::getNextNonSpaceCharacter()` instead
323 - Deprecated `Cursor::getFirstNonSpacePosition()` (#280)
324   - Use `Cursor::getNextNonSpacePosition()` instead
325 - Deprecated `CursorState::getFirstNonSpaceCache()` (#280)
326   - Use `CursorState::getNextNonSpaceCache()` instead
327
328## [0.15.3] - 2016-12-18
329
330### Fixed
331 - Allow inline parsers matching regex delimiter to be created (#271, #272)
332
333## [0.15.2] - 2016-11-22
334
335### Changed
336 - Bumped spec target version to 0.27 (#268)
337 - H2-H6 elements are now parsed as HTML block elements instead of HTML inlines
338
339### Fixed
340 - Fixed incomplete punctuation regex
341 - Fixed shortcut links not being allowed before a `(`
342 - Fixed distinction between Unicode whitespace and regular whitespace
343
344## [0.15.1] - 2016-11-08
345
346### Fixed
347 - Fixed setext heading underlines not allowing trailing tabs (#266)
348
349## [0.15.0] - 2016-09-14
350
351### Added
352 - Added preliminary support for PHP 7.1 (#259)
353 - Added more regression tests (#258, #260)
354
355### Changed
356 - Bumped spec target version to 0.26 (#260)
357 - The `CursorState` constructor requires an additional parameter (#258)
358 - Ordered lists cannot interupt a paragraph unless they start with `1` (#260)
359 - Blank list items cannot interupt a paragraph (#260)
360
361### Deprecated
362 - Deprecated `DelimiterStack::findFirstMatchingOpener()` - use `findMatchingOpener()` instead (#260)
363
364### Fixed
365 - Fixed tabs in ATX headers and thematic breaks (#260)
366 - Fixed issue where cursor state was not being restored properly (#258, #260)
367   - This fixed the lists-with-tabs regression reported in #258
368
369### Removed
370 - Removed an unnecessary check in `Cursor::advanceBy()` (#260)
371 - Removed the two-blanks-break-out-of-lists feature (#260)
372
373
374## [0.14.0] - 2016-07-02
375### Added
376 - The `safe` option is deprecated and replaced by 2 new options (#253, #255):
377   - `html_input` (`strip`, `allow` or `escape`): how to handle untrusted HTML input (the default is `strip` for BC reasons)
378   - `allow_unsafe_links` (`true` or `false`): whether to allow risky image URLs and links (the default is `true` for BC reasons)
379
380### Deprecated
381 - The `safe` option is now deprecated and will be removed in the 1.0.0 release.
382
383## [0.13.4] - 2016-06-14
384
385### Fixed
386 - Fixed path to `autoload.php` within bin/commonmark (#250)
387
388## [0.13.3] - 2016-05-21
389
390### Added
391 - Added `setUrl()` method for `Link` and `Image` elements (#227, #244)
392 - Added cebe/markdown to the benchmark tool (#245)
393
394## [0.13.2] - 2016-03-27
395
396### Added
397 - Added ability to invoke `Converter` as a function (#233, #239)
398 - Added new `advanceBySpaceOrTab` convenience method to `Cursor`
399
400### Changed
401 - Bumped spec target version to 0.25
402 - Adjusted how tabs are handled by the `Cursor` (#234)
403 - Made a couple small micro-optimizations to heavily used functions (#240)
404 - Updated URLs in docblocks to use HTTPS where possible (#238)
405
406## [0.13.1] - 2016-03-09
407
408### Changed
409 - Refactored `EmphasisParser::parse()` to simplify it (#223)
410 - Updated dev dependencies (#218 & #220)
411
412### Fixed
413 - Fixed invalid regex generated when no inline parsers are defined (#224)
414 - Fixed logic bug with blank line after empty list item (#230)
415 - Fixed some incorrect code comments
416
417### Removed
418 - Removed unused variables (#223)
419
420## [0.13.0] - 2016-01-13
421
422### Added
423 - Added AST document processors (#210)
424 - Added optional `Environment` parameter to `CommonMarkConverter` constructor
425
426### Changed
427 - Renamed "header" things to "heading" for spec consistency
428   - `Header` => `Heading`
429   - `ATXHeaderParser` => `ATXHeadingParser`
430   - `SetExtHeaderParser` => `SetExtHeadingParser`
431   - `HeaderRenderer` => `HeadingRenderer`
432 - Renamed "HorizontalRule" to "ThematicBreak" for spec consistency
433   - `HorizontalRule` => `ThematicBreak`
434   - `HorizontalRuleParser` => `ThematicBreakParser`
435   - `HorizontalRuleRenderer` => `ThematicBreakRenderer`
436   - `HorizontalRuleRendererTest` => `ThematicBreakRendererTest`
437   - `RegexHelper::getHRuleRegex()` => `RegexHelper::getThematicBreakRegex()`
438 - Renamed inline "Html" and "RawHtml" to "HtmlInline" for consistency
439   - `Html` => `HtmlInline`
440   - `RawHtmlParser` => `HtmlInlineParser`
441   - `RawHtmlRenderer` => `HtmlInlineRenderer`
442 - Don't allow whitespace between link text and link label of a reference link (spec change)
443 - Don't allow spaces in link destinations, even in `<>`
444 - Allow multiline setext header content
445   - The `Heading` constructor now allows `$contents` to be a `string` (old behavior) or `string[]` (new)
446
447### Fixed
448 - Fixed several list issues and regressions (jgm/commonmark.js#59)
449
450### Removed
451 - Removed schema whitelist from autolink regex
452 - Moved SmartPunct functionality into new [league/commonmark-extras](https://github.com/thephpleague/commonmark-extras) package
453
454## [0.12.0] - 2015-11-04
455
456### Added
457 - Added ability to configure characters and disable emphasis/strong (#135)
458 - Added new ConfigurationAwareInterface support for all parsers, processors, and renderers (#201)
459 - Added HTML safe mode to handle untrusted input (#200, #201)
460   - Safe mode is disabled by default for backwards-compatibility
461   - To enable it, set the `safe` option to `true`
462 - Added AppVeyor integration for automated unit/functional testing on Windows (#195)
463
464### Changed
465 - `AbstractBlock::finalize()` now requires a second parameter, `$endLineNumber`
466 - `RegexHelper::REGEX_ENTITY` no longer includes the starting `/` or the ending `/i` (#194)
467 - `Node::setParent()` now accepts null values (#203)
468
469### Fixed
470 - Fixed incorrect `endLine` positions (#187)
471 - Fixed `DocParser::preProcessInput` dropping up to 2 ending newlines instead of just one
472 - Fixed `EntityParser` not checking for ampersands at the start of the current position (#192, #194)
473
474### Removed
475 - Removed protected function Context::addChild()
476   - It was a duplicate of the Context::addBlock() method
477 - Disabled STDIN reading on `bin/commonmark` for Windows due to PHP issues (#189, #195)
478
479## [0.11.3] - 2015-09-25
480### Fixed
481 - Reset container after closing containing lists (#183; jgm/commonmark.js#67)
482   - The temporary fix from 0.11.2 was reverted
483
484## [0.11.2] - 2015-09-23
485### Fixed
486 - Fixed parser checking acceptsLines on the wrong element (#183)
487
488## [0.11.1] - 2015-09-22
489### Changed
490 - Tightened up some loose comparisons
491
492### Fixed
493 - Fixed missing "bin" directive in composer.json
494 - Updated a docblock to match recent changes to method parameters
495
496### Removed
497 - Removed unused variable from within QuoteProcessor's closure
498
499## [0.11.0] - 2015-09-19
500### Added
501 - Added new `Node` class, which both `AbstractBlock` and `AbstractInline` extend from (#169)
502 - Added a `NodeWalker` and `NodeWalkerEvent` to traverse the AST without using recursion
503 - Added new `InlineContainer` interface for blocks
504 - Added new `getContainer()` and `getReferenceMap()` methods to `InlineParserContext`
505 - Added `iframe` to whitelist of HTML block tags (as per spec)
506 - Added `./bin/commonmark` for converting Markdown at the command line
507
508### Changed
509 - Bumped spec target version to 0.22
510 - Revised AST to use a double-linked list (#169)
511 - `AbstractBlock` and `AbstractInline` both extend from `Node`
512   - Sub-classes must implement new `isContainer()` method
513 - Other major changes to `AbstractBlock`:
514   - `getParent()` is now `parent()`
515   - `setParent()` now expects a `Node` instead of an `AbstractBlock`
516   - `getChildren()` is now `children()`
517   - `getLastChild()` is now `lastChild()`
518   - `addChild()` is now `appendChild()`
519 - `InlineParserContext` is constructed using the container `AbstractBlock` and the document's `RefereceMap`
520   - The constructor will automatically create the `Cursor` using the container's string contents
521 - `InlineParserEngine::parse` now requires the `Node` container and the document's `ReferenceMap` instead of a `ContextInterface` and `Cursor`
522 - Changed `Delimiter` to reference the actual inline `Node` instead of the position
523   - The `int $pos` protected member and constructor arg is now `Node $node`
524   - Use `getInlineNode()` and `setInlineNode()` instead of `getPos()` and `setPos()`
525 - Changed `DocParser::processInlines` to use a `NodeWalker` to iterate through inlines
526   - Walker passed as second argument instead of `AbstractBlock`
527   - Uses a `while` loop instead of recursion to traverse the AST
528 - `Image` and `Link` now only accept a string as their second argument
529 - Refactored how `CloseBracketParser::parse()` works internally
530 - `CloseBracketParser::createInline` no longer accepts label inlines
531 - Disallow list item starting with multiple blank lines (see jgm/CommonMark#332)
532 - Modified `AbstractBlock::setLastLineBlank()`
533   - Functionality moved to `AbstractBlock::shouldLastLineBeBlank()` and new `DocParser::setAndPropagateLastLineBlank()` method
534   - `AbstractBlock::setLastLineBlank()` is now a setter method for `AbstractBlock::$lastLineBlank`
535 - `AbstractBlock::handleRemainingContents()` is no longer abstract
536   - A default implementation is provided
537   - Removed duplicate code from sub-classes which used the default implementation - they'll just use the parent method from now on
538
539### Fixed
540 - Fixed logic error in calculation of offset (see jgm/commonmark.js@94053a8)
541 - Fixed bug where `DocParser` checked the wrong method to determine remainder handling behavior
542 - Fixed bug where `HorizontalRuleParser` failed to advance the cursor beyond the parsed horizontal rule characters
543 - Fixed `DocParser` not ignoring the final newline of the input (like the reference parser does)
544
545### Removed
546 - Removed `Block\Element\AbstractInlineContainer`
547   - Extend `AbstractBlock` and implement `InlineContainer` instead
548   - Use child methods instead of `getInlines` and `setInlines`
549 - Removed `AbstractBlock::replaceChild()`
550   - Call `Node::replaceWith()` directly the child node instead
551 - Removed the `getInlines()` method from `InlineParserContext`
552   - Add parsed inlines using `$inlineContext->getContainer()->appendChild()` instead of `$inlineContext->getInlines()->add()`
553 - Removed the `ContextInterface` argument from `AbstractInlineParser::parse()` and `InlineParserEngine::parseCharacter`
554 - Removed the first `ArrayCollection $inlines` argument from `InlineProcessorInterface::processInlines()`
555 - Removed `CloseBracketParser::nullify()`
556 - Removed `pre` from rule 6 of HTML blocks (see jgm/CommonMark#355)
557
558## [0.10.0] - 2015-07-25
559### Added
560 - Added parent references to inline elements (#124)
561 - Added smart punctuation extension (#134)
562 - Added HTML block types
563 - Added indentation caching to the cursor
564 - Added automated code style checks (#133)
565 - Added support for tag attributes in renderers (#101, #165)
566
567### Changed
568 - Bumped spec target version to 0.21
569 - Revised HTML block parsing to conform to new spec (jgm/commonmark.js@99bd473)
570 - Imposed 9-digit limit on ordered list markers, per spec
571 - Allow non-initial hyphens in html tag names (jgm/CommonMark#239)
572 - Updated list of block tag names
573 - Changed tab/indentation handling to meet the new spec behavior
574 - Modified spec tests to show spaces and tabs in test results
575 - Replaced `HtmlRendererInterface` with `ElementRendererInterface` (#141)
576 - Removed the unnecessary `trim()` and string cast from `ListItemRenderer`
577
578### Fixed
579 - Fixed link reference definition edge case (#120)
580 - Allow literal (non-escaping) backslashes in link destinations (#118)
581 - Allow backslash-escaped backslashes in link labels (#119)
582 - Allow link labels up to 999 characters (per the spec)
583 - Properly split on whitespace when determining code block class (jgm/commonmark.js#54)
584 - Fixed code style issues (#132, #133, #151, #152)
585 - Fixed wording for invalid inline exception (#136)
586
587### Removed
588 - Removed the advance-by-one optimization due to added cursor complexity
589
590## [0.9.0] - 2015-06-18
591### Added
592 - Added public $data array to block elements (#95)
593 - Added `isIndented` helper method to `Cursor`
594 - Added a new `Converter` base class which `CommonMarkConverter` extends from (#105)
595
596### Changed
597 - Bumped spec target version to 0.20 (#112)
598 - Renamed ListBlock::$data and ListItem::$data to $listData
599 - Require link labels to contain non-whitespace (jgm/CommonMark#322)
600 - Use U+FFFD for entities resolving to 0 (jgm/CommonMark#323)
601 - Moved `IndentedCodeParser::CODE_INDENT_LEVEL` to `Cursor::INDENT_LEVEL`
602 - Changed arrays to short syntax (#116)
603 - Improved efficiency of DelimiterStack iteration (jgm/commonmark.js#43)
604
605### Fixed
606 - Fixed open block tag followed by newline not being recognized (jgm/CommonMark#324)
607 - Fixed indented lists sometimes being parsed incorrectly (jgm/commonmark.js#42)
608
609## [0.8.0] - 2015-04-29
610### Added
611 - Allow swapping built-in renderers without using their fully qualified names (#84)
612 - Lots of unit tests (for existing code)
613 - Ability to include arbitrary functional tests in addition to spec-based tests
614
615### Changed
616 - Dropped support for PHP 5.3 (#64 and #76)
617 - Bumped spec target version to 0.19
618 - Made the AbstractInlineContainer be abstract
619 - Moved environment config. logic into separate class
620
621### Fixed
622 - Fixed underscore emphasis to conform to spec changes (jgm/CommonMark#317)
623
624### Removed
625 - Removed PHP 5.3 workaround (see commit 5747822)
626 - Removed unused AbstractWebResource::setUrl() method
627 - Removed unnecessary check for hrule when parsing lists (#85)
628
629## [0.7.2] - 2015-03-08
630### Changed
631 - Bumped spec target version to 0.18
632
633### Fixed
634 - Fixed broken parsing of emphasized text ending with a '0' character (#81)
635
636## [0.7.1] - 2015-03-01
637### Added
638 - All references can now be obtained from the `ReferenceMap` via `listReferences()` (#73)
639 - Test against PHP 7.0 (nightly) but allow failures
640
641### Changed
642 - ListData::$start now defaults to null instead of 0 (#74)
643 - Replace references to HtmlRenderer with new HtmlRendererInterface
644
645### Fixed
646 - Fixed 0-based ordered lists starting at 1 instead of 0 (#74)
647 - Fixed errors parsing multi-byte characters (#78 and #79)
648
649## [0.7.0] - 2015-02-16
650### Added
651 - More unit tests to increase code coverage
652
653### Changed
654 - Enabled the InlineParserEngine to parse several non-special characters at once (performance boost)
655 - NewlineParser no longer attempts to parse spaces; look-behind is used instead (major performance boost)
656 - Moved closeUnmatchedBlocks into its own class
657 - Image and link elements now extend AbstractInlineContainer; label data is stored via $inlineContents instead
658 - Renamed AbstractInlineContainer::$inlineContents and its getter/setter
659
660### Removed
661 - Removed the InlineCollection class
662 - Removed the unused ArrayCollection::splice() method
663 - Removed impossible-to-reach code in Cursor::advanceToFirstNonSpace
664 - Removed unnecessary test from the InlineParserEngine
665 - Removed unnecessary/unused RegexHelper::getMainRegex() method
666
667## [0.6.1] - 2015-01-25
668### Changed
669 - Bumped spec target version to 0.17
670 - Updated emphasis parsing for underscores to prevent intra-word emphasis
671 - Deferred closing of fenced code blocks
672
673## [0.6.0] - 2015-01-09
674### Added
675 - Bulk registration of parsers/renderers via extensions (#45)
676 - Proper UTF-8 support, especially in the Cursor; mbstring extension is now required (#49)
677 - Environment is now configurable; options can be accessed in its parsers/renderers (#56)
678 - Added some unit tests
679
680### Changed
681 - Bumped spec target version to 0.15 (#50)
682 - Parsers/renderers are now lazy-initialized (#52)
683 - Some private elements are now protected for easier extending, especially on Element classes (#53)
684 - Renderer option keys changed from camelCase to underscore_case (#56)
685 - Moved CommonMark parser/render definitions into CommonMarkCoreExtension
686
687### Fixed
688 - Improved parsing of emphasis around punctuation
689 - Improved regexes for CDATA and HTML comments
690 - Fixed issue with HTML content that is considered false in loose comparisons, like `'0'` (#55)
691 - Fixed DocParser trying to add empty strings to closed containers (#58)
692 - Fixed incorrect use of a null parameter value in the HtmlElementTest
693
694### Removed
695 - Removed unused ReferenceDefinition* classes (#51)
696 - Removed UnicodeCaseFolder in favor of mb_strtoupper
697
698## [0.5.1] - 2014-12-27
699### Fixed
700 - Fixed infinite loop and link-in-link-in-image parsing (#37)
701
702### Removed
703 - Removed hard dependency on mbstring extension; workaround used if not installed (#38)
704
705## [0.5.0] - 2014-12-24
706### Added
707 - Support for custom directives, parsers, and renderers
708
709### Changed
710 - Major refactoring to de-couple directives from the parser, support custom directive functionality, and reduce complexity
711 - Updated references to stmd.js in README and docblocks
712 - Modified CHANGELOG formatting
713 - Improved travis configuration
714 - Put tests in autoload-dev
715
716### Fixed
717 - Fixed CommonMarkConverter re-creating object each time new text is converted (#26)
718
719### Removed
720 - Removed HtmlRenderer::render() (use the renderBlock method instead)
721 - Removed dependency on symfony/options-resolver (fixes #20)
722
723## [0.4.0] - 2014-12-15
724### Added
725 - Added some missing copyright info
726
727### Changed
728 - Changed namespace to League\CommonMark
729 - Made compatible with spec version 0.13
730 - Moved delimiter stack functionality into separate class
731
732### Fixed
733 - Fixed regex which caused HHVM tests to fail
734
735## [0.3.0] - 2014-11-28
736### Added
737 - Made renderer options configurable (issue #7)
738
739### Changed
740 - Made compatible with spec version 0.12
741 - Stack-based parsing now used for emphasis, links and images
742 - Protected some of the internal renderer methods which shouldn't have been `public`
743 - Minor code clean-up (including PSR-2 compliance)
744
745### Removed
746 - Removed unnecessary distinction between ATX and Setext headers
747
748## [0.2.1] - 2014-11-09
749### Added
750 - Added simpler string replacement to a method
751
752### Changed
753 - Removed "is" prefix from boolean methods
754 * Updated to latest version of PHPUnit
755 * Target specific spec version
756
757## [0.2.0] - 2014-11-09
758### Changed
759 - Mirrored significant changes and improvements from stmd.js
760 - Made compatible with spec version 0.10
761 - Updated location of JGM's repository
762 - Allowed HHVM tests to fail without affecting overall build success
763
764### Removed
765 - Removed composer.lock
766 - Removed fixed reference to jgm/stmd@0275f34
767
768## [0.1.2] - 2014-09-28
769### Added
770 - Added performance benchmarking tool (issue #2)
771 - Added more badges to the README
772
773### Changed
774 - Fix JS -> PHP null judgement (issue #4)
775 - Updated phpunit dependency
776
777## [0.1.1] - 2014-09-08
778### Added
779 - Add anchors to regexes
780
781### Changed
782 - Updated target spec (now compatible with jgm/stmd:spec.txt @ 2cf0750)
783 - Adjust HTML output for fenced code
784 - Adjust block-level tag regex (remove "br", add "iframe")
785 - Fix incorrect handling of nested emphasis
786
787## 0.1.0
788### Added
789 - Initial commit (compatible with jgm/stmd:spec.txt @ 0275f34)
790
791[0.19.3]: https://github.com/thephpleague/commonmark/compare/0.19.2...0.19.3
792[0.19.2]: https://github.com/thephpleague/commonmark/compare/0.19.1...0.19.2
793[0.19.1]: https://github.com/thephpleague/commonmark/compare/0.19.0...0.19.1
794[0.19.0]: https://github.com/thephpleague/commonmark/compare/0.18.5...0.19.0
795[0.18.5]: https://github.com/thephpleague/commonmark/compare/0.18.4...0.18.5
796[0.18.4]: https://github.com/thephpleague/commonmark/compare/0.18.3...0.18.4
797[0.18.3]: https://github.com/thephpleague/commonmark/compare/0.18.2...0.18.3
798[0.18.2]: https://github.com/thephpleague/commonmark/compare/0.18.1...0.18.2
799[0.18.1]: https://github.com/thephpleague/commonmark/compare/0.18.0...0.18.1
800[0.18.0]: https://github.com/thephpleague/commonmark/compare/0.17.5...0.18.0
801[0.17.5]: https://github.com/thephpleague/commonmark/compare/0.17.4...0.17.5
802[0.17.4]: https://github.com/thephpleague/commonmark/compare/0.17.3...0.17.4
803[0.17.3]: https://github.com/thephpleague/commonmark/compare/0.17.2...0.17.3
804[0.17.2]: https://github.com/thephpleague/commonmark/compare/0.17.1...0.17.2
805[0.17.1]: https://github.com/thephpleague/commonmark/compare/0.17.0...0.17.1
806[0.17.0]: https://github.com/thephpleague/commonmark/compare/0.16.0...0.17.0
807[0.16.0]: https://github.com/thephpleague/commonmark/compare/0.15.7...0.16.0
808[0.15.7]: https://github.com/thephpleague/commonmark/compare/0.15.6...0.15.7
809[0.15.6]: https://github.com/thephpleague/commonmark/compare/0.15.5...0.15.6
810[0.15.5]: https://github.com/thephpleague/commonmark/compare/0.15.4...0.15.5
811[0.15.4]: https://github.com/thephpleague/commonmark/compare/0.15.3...0.15.4
812[0.15.3]: https://github.com/thephpleague/commonmark/compare/0.15.2...0.15.3
813[0.15.2]: https://github.com/thephpleague/commonmark/compare/0.15.1...0.15.2
814[0.15.1]: https://github.com/thephpleague/commonmark/compare/0.15.0...0.15.1
815[0.15.0]: https://github.com/thephpleague/commonmark/compare/0.14.0...0.15.0
816[0.14.0]: https://github.com/thephpleague/commonmark/compare/0.13.4...0.14.0
817[0.13.4]: https://github.com/thephpleague/commonmark/compare/0.13.3...0.13.4
818[0.13.3]: https://github.com/thephpleague/commonmark/compare/0.13.2...0.13.3
819[0.13.2]: https://github.com/thephpleague/commonmark/compare/0.13.1...0.13.2
820[0.13.1]: https://github.com/thephpleague/commonmark/compare/0.13.0...0.13.1
821[0.13.0]: https://github.com/thephpleague/commonmark/compare/0.12.0...0.13.0
822[0.12.0]: https://github.com/thephpleague/commonmark/compare/0.11.3...0.12.0
823[0.11.3]: https://github.com/thephpleague/commonmark/compare/0.11.2...0.11.3
824[0.11.2]: https://github.com/thephpleague/commonmark/compare/0.11.1...0.11.2
825[0.11.1]: https://github.com/thephpleague/commonmark/compare/0.11.0...0.11.1
826[0.11.0]: https://github.com/thephpleague/commonmark/compare/0.10.0...0.11.0
827[0.10.0]: https://github.com/thephpleague/commonmark/compare/0.9.0...0.10.0
828[0.9.0]: https://github.com/thephpleague/commonmark/compare/0.8.0...0.9.0
829[0.8.0]: https://github.com/thephpleague/commonmark/compare/0.7.2...0.8.0
830[0.7.2]: https://github.com/thephpleague/commonmark/compare/0.7.1...0.7.2
831[0.7.1]: https://github.com/thephpleague/commonmark/compare/0.7.0...0.7.1
832[0.7.0]: https://github.com/thephpleague/commonmark/compare/0.6.1...0.7.0
833[0.6.1]: https://github.com/thephpleague/commonmark/compare/0.6.0...0.6.1
834[0.6.0]: https://github.com/thephpleague/commonmark/compare/0.5.1...0.6.0
835[0.5.1]: https://github.com/thephpleague/commonmark/compare/0.5.0...0.5.1
836[0.5.0]: https://github.com/thephpleague/commonmark/compare/0.4.0...0.5.0
837[0.4.0]: https://github.com/thephpleague/commonmark/compare/0.3.0...0.4.0
838[0.3.0]: https://github.com/thephpleague/commonmark/compare/0.2.1...0.3.0
839[0.2.1]: https://github.com/thephpleague/commonmark/compare/0.2.0...0.2.1
840[0.2.0]: https://github.com/thephpleague/commonmark/compare/0.1.2...0.2.0
841[0.1.2]: https://github.com/thephpleague/commonmark/compare/0.1.1...0.1.2
842[0.1.1]: https://github.com/thephpleague/commonmark/compare/0.1.0...0.1.1
843