Skip to content

Releases: thephpleague/commonmark

1.5.5

13 Sep 14:45
45832df
Compare
Choose a tag to compare

Changed

  • Bumped CommonMark spec compliance to 0.28.2

Fixed

  • Fixed textarea elements not being treated as a type 1 HTML block (like script, style, or pre)
  • Fixed autolink processor not handling other unmatched trailing parentheses

1.5.4

18 Aug 01:20
21819c9
Compare
Choose a tag to compare

Fixed

  • Fixed footnote ID configuration not taking effect (#524, #530)
  • Fixed heading permalink slugs not being unique (#531, #534)

1.5.3

19 Jul 22:52
2574454
Compare
Choose a tag to compare

Fixed

  • Fixed regression of multi-byte inline parser characters not being matched

1.5.2

19 Jul 22:34
9bc3b1d
Compare
Choose a tag to compare

Changed

  • Significantly improved performance of the inline parser regex

Fixed

  • Fixed parent class lookups for non-existent classes on PHP 8 (#517)

1.5.1

27 Jun 12:51
6d74caf
Compare
Choose a tag to compare

Fixed

  • Fixed UTF-8 encoding not being checked in the UrlEncoder utility (#509) or the Cursor

1.5.0

21 Jun 20:57
fc33ca1
Compare
Choose a tag to compare

Added

  • Added new AttributesExtension based on https://github.com/webuni/commonmark-attributes-extension (#474)
  • Added new FootnoteExtension based on https://github.com/rezozero/commonmark-ext-footnotes (#474)
  • Added new MentionExtension to replace InlineMentionParser with more flexibility and customization
  • Added the ability to render TableOfContents nodes anywhere in a document (given by a placeholder)
  • Added the ability to properly clone Node objects
  • Added options to customize the value of rel attributes set via the ExternalLink extension (#476)
  • Added a new heading_permalink/slug_normalizer configuration option to allow custom slug generation (#460)
  • Added a new heading_permalink/symbol configuration option to replace the now deprecated heading_permalink/inner_contents configuration option (#505)
  • Added SlugNormalizer and TextNormalizer classes to make normalization reusable by extensions (#485)
  • Added new classes:
    • TableOfContentsGenerator
    • TableOfContentsGeneratorInterface
    • TableOfContentsPlaceholder
    • TableOfContentsPlaceholderParser
    • TableOfContentsPlaceholderRenderer

Changed

  • "Moved" the TableOfContents class into a new Node sub-namespace (with backward-compatibility)
  • Reference labels are now generated and stored in lower-case instead of upper-case
  • Reference labels are no longer normalized inside the Reference, only the ReferenceMap

Fixed

  • Fixed reference label case folding polyfill not being consistent between different PHP versions

Deprecated

  • Deprecated the CommonMarkConverter::VERSION constant (#496)
  • Deprecated League\CommonMark\Extension\Autolink\InlineMentionParser (use League\CommonMark\Extension\Mention\MentionParser instead)
  • Deprecated everything under League\CommonMark\Extension\HeadingPermalink\Slug (use the classes under League\CommonMark\Normalizer instead)
  • Deprecated League\CommonMark\Extension\TableOfContents\TableOfContents (use the one in the new Node sub-namespace instead)
  • Deprecated the STYLE_ and NORMALIZE_ constants in TableOfContentsBuilder (use the ones in TableOfContentsGenerator instead)
  • Deprecated the \League\CommonMark\Extension\HeadingPermalink\HeadingPermalinkRenderer::DEFAULT_INNER_CONTENTS constant (#505)
  • Deprecated the heading_permalink/inner_contents configuration option in the HeadingPermalink extension (use the new heading_permalink/symbol configuration option instead) (#505)

1.4.3

04 May 22:16
412639f
Compare
Choose a tag to compare

Fixed

  • Fixed certain Unicode letters, numbers, and marks not being preserved when generating URL slugs (#467)

1.4.2

24 Apr 13:43
9e780d9
Compare
Choose a tag to compare

Fixed

  • Fixed inline code blocks not be included within heading permalinks (#457)

1.4.1

20 Apr 13:38
c995966
Compare
Choose a tag to compare

Fixed

  • Fixed BC break caused by ConverterInterface alias not being used by some DI containers (#454)

1.4.0

18 Apr 20:50
517cbe1
Compare
Choose a tag to compare

Added

  • Added new Heading Permalink extension (#420)
  • Added new Table of Contents extension (#441)
  • Added new MarkdownConverterInterface as a long-term replacement for ConverterInterface (#439)
  • Added new DocumentPreParsedEvent event (#427, #359, #399)
  • Added new ListBlock::TYPE_BULLET constant as a replacement for ListBlock::TYPE_UNORDERED
  • Added new MarkdownInput class and MarkdownInputInterface to handle pre-parsing and allow listeners to replace Markdown contents

Changed

  • Block & inline renderers will now render child classes automatically (#222, #209)
  • The ListBlock constants now use fully-lowercased values instead of titlecased values
  • Significantly improved typing

Fixed

  • Fixed loose comparison when checking for table alignment
  • Fixed StaggeredDelimiterProcessor returning from a void function

Deprecated

  • The Converter class has been deprecated; use CommonMarkConverter instead (#438, #439)
  • The ConverterInterface has been deprecated; use MarkdownConverterInterface instead (#438, #439)
  • The bin/commonmark script has been deprecated
  • The following methods of ArrayCollection have been deprecated:
    • add()
    • set()
    • get()
    • remove()
    • isEmpty()
    • contains()
    • indexOf()
    • containsKey()
    • replaceWith()
    • removeGaps()
  • The ListBlock::TYPE_UNORDERED constant has been deprecated, use ListBlock::TYPE_BULLET instead