Skip to content

Releases: thephpleague/commonmark

0.17.3

26 Mar 20:10
Compare
Choose a tag to compare

Fixed

  • Fixed incorrect version constant value (#322)

0.17.2

26 Mar 01:41
ea1f655
Compare
Choose a tag to compare

Added

  • Added new RegexHelper::isEscapable() method

Fixed

  • Fixed spec compliance bug where escaped spaces should not be allowed in link destinations

0.17.1

18 Mar 13:19
Compare
Choose a tag to compare

Added

  • Added a new constant containing the current version: CommonMarkConverter::VERSION (#314)

0.17.0

30 Dec 22:12
3b4c222
Compare
Choose a tag to compare

This release contains several breaking changes and a minimum PHP version bump - see UPGRADE.md for more details.

Added

  • Added new max_nesting_level setting (#243)
  • Added minor performance optimizations to Cursor

Changed

  • Minimum PHP version is now 5.6.5.
  • All full and partial regular expressions in RegexHelper are now defined as constants instead of being built on-the-fly.
  • Cursor::saveState() now returns an array instead of a CursorState object.
  • Cursor::restoreState() now accepts an array parameter instead of a CursorState object.
  • Saving/restoring the Cursor state no longer tracks things that don't change (like the text content).
  • RegexHelper is now final.
  • References to InlineContainer changed to new InlineContainerInterface interface.
  • MiscExtension::addInlineParser() and MiscExtension::addBlockRenderer() now return $this instead of nothing.

Fixed

  • Fixed Reference::normalizeReference() not properly collapsing whitespace to a single space

Deprecated

  • RegexHelper::getInstance() and all instance (non-static) methods have been deprecated.
  • The InlineContainer interface has been deprecated. Use InlineContainerInterface instead.

Removed

  • Removed support for PHP 5.4 and 5.5.
  • Removed CursorState class
  • Removed all previous deprecations:
    • Cursor::getFirstNonSpacePosition()
    • Cursor::getFirstNonSpaceCharacter()
    • Cursor::advanceWhileMatches()
    • Cursor::advanceToFirstNonSpace()
    • ElementRendererInterface::escape()
    • HtmlRenderer::escape()
    • RegexHelper::REGEX_UNICODE_WHITESPACE
    • RegexHelper::getLinkDestinationRegex()

0.16.0

31 Oct 00:59
Compare
Choose a tag to compare

This release contains breaking changes, several performance improvements, and two deprecations:

Added

  • Added new Xml utility class; moved HTML/XML escaping logic into there (see deprecations below)

Changed

  • Environment::getInlineParsersForCharacter() now returns an empty array (instead of null) when no matching parsers are found
  • Three utility classes are now marked final:
    • Html5Entities
    • LinkParserHelper
    • UrlEncoder

Fixed

  • Improved performance of several methods (for a 10% overall performance boost - #292)

Deprecated

The 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.

  • Cursor::advanceWhileMatches() deprecated; use Cursor::match() instead.
  • HtmlRenderer::escape() deprecated; use Xml::escape() instead.

Removed

  • Removed DelimiterStack::findFirstMatchingOpener() which was previously deprecated in 0.15.0

0.15.7

26 Oct 15:46
Compare
Choose a tag to compare

Fixed

  • Improved performance of Cursor::advanceBy() (for a 16% performance boost!) 🎉

0.15.6

08 Aug 11:48
Compare
Choose a tag to compare

Fixed

  • Fixed URI normalization not properly encoding/decoding special characters in certain cases (#287)

0.15.5

05 Aug 19:42
Compare
Choose a tag to compare

This release bumps spec compliance to 0.28 without breaking changes to the API.

Added

  • Project is now tested against PHP 7.2

Changed

  • Bumped CommonMark spec target to 0.28
  • Changed internal implementation of LinkParserHelper::parseLinkDestination() to allow nested parens
  • Changed precedence of strong/emph when both nestings are possible (rule 14)
  • Allow tabs before and after ATX closing header

Fixed

  • Fixed HTML type 6 block regex matching against <pre> (it shouldn't) and not matching <iframe> (it should)
  • Fixed reference parser incorrectly handling escaped ] characters
  • Fixed "multiple of 3" delimiter run calculations

Deprecated

An unused constant and static method were deprecated and will be removed in a future release. See <UPGRADE.md> for more information.

  • Deprecated RegexHelper::REGEX_UNICODE_WHITESPACE (no longer used)
  • Deprecated RegexHelper::getLinkDestinationRegex() (no longer used)

0.15.4

09 May 12:48
Compare
Choose a tag to compare

Added

  • Added new methods to Cursor (#280):
    • advanceToNextNonSpaceOrNewline() - Identical replacement for the (now-deprecated) advanceToFirstNonSpace() method
    • advanceToNextNonSpaceOrTab() - Similar replacement for advanceToFirstNonSpace() but with proper tab handling
    • getNextNonSpaceCharacter() - Identical replacement for the (now-deprecated) getFirstNonSpaceCharacter() method
    • getNextNonSpacePosition() - Identical replacement for the (now-deprecated) getFirstNonSpacePosition() method
  • Added new method to CursorState (#280):
    • getNextNonSpaceCache() - Identical replacement for the (now-deprecated) getFirstNonSpaceCache() method

Fixed

  • Fixed duplicate characters in non-intended lines containing tabs (#279)

Deprecated

All deprecations listed here will be removed in a future 0.x release. See UPGRADE.md for instructions on preparing your code for the eventual removal of these methods.

  • Deprecated Cursor::advanceToFirstNonSpace() (#280)
    • Use advanceToNextNonSpaceOrTab() or advanceToNextNonSpaceOrNewline() instead, depending on your requirements
  • Deprecated Cursor::getFirstNonSpaceCharacter() (#280)
    • Use Cursor::getNextNonSpaceCharacter() instead
  • Deprecated Cursor::getFirstNonSpacePosition() (#280)
    • Use Cursor::getNextNonSpacePosition() instead
  • Deprecated CursorState::getFirstNonSpaceCache() (#280)
    • Use CursorState::getNextNonSpaceCache() instead

0.15.3

19 Dec 00:16
Compare
Choose a tag to compare

Fixed

  • Allow inline parsers matching regex delimiter to be created (#271, #272)