Skip to content

Releases: thephpleague/commonmark

0.10.0

25 Jul 14:37

Choose a tag to compare

Added

  • Added parent references to inline elements (#124)
  • Added smart punctuation extension (#134)
  • Added HTML block types
  • Added indentation caching to the cursor
  • Added automated code style checks (#133)
  • Added support for tag attributes in renderers (#101, #165)

Changed

  • Bumped spec target version to 0.21
  • Revised HTML block parsing to conform to new spec (commonmark/commonmark.js@99bd473)
  • Imposed 9-digit limit on ordered list markers, per spec
  • Allow non-initial hyphens in html tag names (commonmark/commonmark-spec#239)
  • Updated list of block tag names
  • Changed tab/indentation handling to meet the new spec behavior
  • Modified spec tests to show spaces and tabs in test results
  • Replaced HtmlRendererInterface with ElementRendererInterface (#141)
  • Removed the unnecessary trim() and string cast from ListItemRenderer

Fixed

  • Fixed link reference definition edge case (#120)
  • Allow literal (non-escaping) backslashes in link destinations (#118)
  • Allow backslash-escaped backslashes in link labels (#119)
  • Allow link labels up to 999 characters (per the spec)
  • Properly split on whitespace when determining code block class (commonmark/commonmark.js#54)
  • Fixed code style issues (#132, #133, #151, #152)
  • Fixed wording for invalid inline exception (#136)

Removed

  • Removed the advance-by-one optimization due to added cursor complexity

0.9.0

19 Jun 00:41

Choose a tag to compare

Added

  • Added public $data array to block elements (#95)
  • Added isIndented helper method to Cursor
  • Added a new Converter base class which CommonMarkConverter extends from (#105)

Changed

Fixed

0.8.0

29 Apr 18:02

Choose a tag to compare

Added

  • Allow swapping built-in renderers without using their fully qualified names (#84)
  • Lots of unit tests (for existing code)
  • Ability to include arbitrary functional tests in addition to spec-based tests

Changed

  • Dropped support for PHP 5.3 (#64 and #76)
  • Bumped spec target version to 0.19
  • Made the AbstractInlineContainer be abstract
  • Moved environment config. logic into separate class

Fixed

Removed

  • Removed PHP 5.3 workaround (see commit 5747822)
  • Removed unused AbstractWebResource::setUrl() method
  • Removed unnecessary check for hrule when parsing lists (#85)

0.7.2

08 Mar 17:54

Choose a tag to compare

Changed

  • Bumped spec target version to 0.18

Fixed

  • Fixed broken parsing of emphasized text ending with a '0' character (#81)

0.7.1

01 Mar 21:29

Choose a tag to compare

Added

  • All references can now be obtained from the ReferenceMap via listReferences() (#73)
  • Test against PHP 7.0 (nightly) but allow failures

Changed

  • ListData::$start now defaults to null instead of 0 (#74)
  • Replace references to HtmlRenderer with new HtmlRendererInterface

Fixed

  • Fixed 0-based ordered lists starting at 1 instead of 0 (#74)
  • Fixed errors parsing multi-byte characters (#78 and #79)

0.7.0

17 Feb 00:02

Choose a tag to compare

Now with 50% more speed!

Added

  • More unit tests to increase code coverage

Changed

  • Enabled the InlineParserEngine to parse several non-special characters at once (performance boost)
  • NewlineParser no longer attempts to parse spaces; look-behind is used instead (major performance boost)
  • Moved closeUnmatchedBlocks into its own class
  • Image and link elements now extend AbstractInlineContainer; label data is stored via $inlineContents instead
  • Renamed AbstractInlineContainer::$inlineContents and its getter/setter

Removed

  • Removed the InlineCollection class
  • Removed the unused ArrayCollection::splice() method
  • Removed impossible-to-reach code in Cursor::advanceToFirstNonSpace
  • Removed unnecessary test from the InlineParserEngine
  • Removed unnecessary/unused RegexHelper::getMainRegex() method

0.6.1

25 Jan 16:09

Choose a tag to compare

Changed

  • Bumped spec target version to 0.17
  • Updated emphasis parsing for underscores to prevent intra-word emphasis
  • Defered closing of fenced code blocks

0.6.0

09 Jan 19:33

Choose a tag to compare

Added

  • Bulk registration of parsers/renderers via extensions (#45)
  • Proper UTF-8 support, especially in the Cursor; mbstring extension is now required (#49)
  • Environment is now configurable; options can be accessed in its parsers/renderers (#56)
  • Added some unit tests

Changed

  • Bumped spec target version to 0.15 (#50)
  • Parsers/renderers are now lazy-initialized (#52)
  • Some private elements are now protected for easier extending, especially on Element classes (#53)
  • Renderer option names changed from underscore_case to camelCase (#56)
  • Moved CommonMark parser/render definitions into CommonMarkCoreExtension

Fixed

  • Improved parsing of emphasis around punctuation
  • Improved regexes for CDATA and HTML comments
  • Fixed issue with HTML content that is considered false in loose comparisons, like '0' (#55)
  • Fixed DocParser trying to add empty strings to closed containers (#58)
  • Fixed incorrect use of a null parameter value in the HtmlElementTest

Removed

  • Removed unused ReferenceDefinition* classes (#51)
  • Removed UnicodeCaseFolder in favor of mb_strtoupper

0.5.1

27 Dec 15:59

Choose a tag to compare

Fixed

  • Fixed infinite loop and link-in-link-in-image parsing (#37)

Removed

  • Removed hard dependency on mbstring extension; workaround used if not installed (#38)

0.5.0

24 Dec 22:53

Choose a tag to compare

Added

  • Support for custom directives, parsers, and renderers

Changed

  • Major refactoring to de-couple directives from the parser, support custom directive functionality, and reduce complexity
  • Updated references to stmd.js in README and docblocks
  • Modified CHANGELOG formatting
  • Improved travis configuration
  • Put tests in autoload-dev

Fixed

  • Fixed CommonMarkConverter re-creating object each time new text is converted (#26)

Removed

  • Removed dependency on symfony/options-resolver (fixes #20)