From 476e0b588a14416aec7c66ec164d42c88feb20c7 Mon Sep 17 00:00:00 2001 From: Greg Roach Date: Mon, 5 Aug 2019 20:42:16 +0100 Subject: Update dependencies --- vendor/league/commonmark/.phpstorm.meta.php | 9 +- vendor/league/commonmark/CHANGELOG-0.x.md | 842 +++++++++++++++++++ vendor/league/commonmark/CHANGELOG.md | 900 +++------------------ vendor/league/commonmark/LICENSE | 5 +- vendor/league/commonmark/README.md | 119 ++- vendor/league/commonmark/UPGRADE.md | 244 ------ vendor/league/commonmark/bin/commonmark | 5 +- vendor/league/commonmark/commonmark-banner.png | Bin 0 -> 124118 bytes vendor/league/commonmark/composer.json | 4 +- .../commonmark/src/Block/Element/AbstractBlock.php | 10 +- .../Block/Element/AbstractStringContainerBlock.php | 3 + .../commonmark/src/Block/Element/BlockQuote.php | 3 + .../commonmark/src/Block/Element/Document.php | 14 +- .../commonmark/src/Block/Element/ListBlock.php | 3 + .../commonmark/src/Block/Element/ListItem.php | 3 + .../src/Block/Parser/ATXHeadingParser.php | 2 +- .../src/Block/Parser/BlockQuoteParser.php | 2 +- .../src/Block/Parser/FencedCodeParser.php | 2 +- .../src/Block/Parser/HtmlBlockParser.php | 2 +- .../src/Block/Parser/IndentedCodeParser.php | 2 +- .../src/Block/Parser/LazyParagraphParser.php | 2 +- .../commonmark/src/Block/Parser/ListParser.php | 2 +- .../src/Block/Parser/SetExtHeadingParser.php | 11 +- .../src/Block/Parser/ThematicBreakParser.php | 2 +- .../src/Block/Renderer/BlockQuoteRenderer.php | 2 +- .../src/Block/Renderer/DocumentRenderer.php | 2 +- .../src/Block/Renderer/FencedCodeRenderer.php | 2 +- .../src/Block/Renderer/HeadingRenderer.php | 2 +- .../src/Block/Renderer/HtmlBlockRenderer.php | 19 +- .../src/Block/Renderer/IndentedCodeRenderer.php | 2 +- .../src/Block/Renderer/ListBlockRenderer.php | 2 +- .../src/Block/Renderer/ListItemRenderer.php | 2 +- .../src/Block/Renderer/ParagraphRenderer.php | 2 +- .../src/Block/Renderer/ThematicBreakRenderer.php | 2 +- .../league/commonmark/src/CommonMarkConverter.php | 17 +- .../src/ConfigurableEnvironmentInterface.php | 32 +- vendor/league/commonmark/src/Context.php | 35 +- vendor/league/commonmark/src/ContextInterface.php | 6 +- vendor/league/commonmark/src/Converter.php | 6 +- vendor/league/commonmark/src/Cursor.php | 14 +- .../league/commonmark/src/Delimiter/Delimiter.php | 166 ++-- .../src/Delimiter/DelimiterInterface.php | 90 +++ .../commonmark/src/Delimiter/DelimiterStack.php | 166 ++-- .../Processor/DelimiterProcessorCollection.php | 73 ++ .../DelimiterProcessorCollectionInterface.php | 46 ++ .../Processor/DelimiterProcessorInterface.php | 84 ++ .../Processor/EmphasisDelimiterProcessor.php | 123 +++ .../Processor/StaggeredDelimiterProcessor.php | 117 +++ vendor/league/commonmark/src/DocParser.php | 36 +- .../league/commonmark/src/DocParserInterface.php | 24 + .../commonmark/src/DocumentProcessorInterface.php | 27 - .../commonmark/src/ElementRendererInterface.php | 7 + vendor/league/commonmark/src/Environment.php | 101 ++- .../league/commonmark/src/EnvironmentInterface.php | 21 +- .../league/commonmark/src/Event/AbstractEvent.php | 49 ++ .../commonmark/src/Event/DocumentParsedEvent.php | 39 + .../src/Extension/CommonMarkCoreExtension.php | 13 +- vendor/league/commonmark/src/HtmlElement.php | 12 + vendor/league/commonmark/src/HtmlRenderer.php | 4 +- .../commonmark/src/Inline/AdjacentTextMerger.php | 91 +++ .../src/Inline/AdjoiningTextCollapser.php | 43 - .../src/Inline/Element/AbstractInline.php | 3 + .../src/Inline/Element/AbstractInlineContainer.php | 26 - .../src/Inline/Element/AbstractWebResource.php | 10 +- .../commonmark/src/Inline/Element/Emphasis.php | 9 +- .../commonmark/src/Inline/Element/Strong.php | 9 +- .../src/Inline/Parser/AutolinkParser.php | 2 +- .../src/Inline/Parser/BacktickParser.php | 2 +- .../commonmark/src/Inline/Parser/BangParser.php | 2 +- .../src/Inline/Parser/CloseBracketParser.php | 54 +- .../src/Inline/Parser/EmphasisParser.php | 147 ---- .../commonmark/src/Inline/Parser/EntityParser.php | 2 +- .../src/Inline/Parser/EscapableParser.php | 2 +- .../src/Inline/Parser/HtmlInlineParser.php | 2 +- .../commonmark/src/Inline/Parser/NewlineParser.php | 2 +- .../src/Inline/Parser/OpenBracketParser.php | 2 +- .../src/Inline/Processor/EmphasisProcessor.php | 81 -- .../Inline/Processor/InlineProcessorInterface.php | 29 - .../src/Inline/Renderer/CodeRenderer.php | 2 +- .../src/Inline/Renderer/EmphasisRenderer.php | 2 +- .../src/Inline/Renderer/HtmlInlineRenderer.php | 19 +- .../src/Inline/Renderer/ImageRenderer.php | 12 +- .../src/Inline/Renderer/LinkRenderer.php | 12 +- .../src/Inline/Renderer/NewlineRenderer.php | 2 +- .../src/Inline/Renderer/StrongRenderer.php | 2 +- .../src/Inline/Renderer/TextRenderer.php | 2 +- .../league/commonmark/src/InlineParserContext.php | 8 +- .../league/commonmark/src/InlineParserEngine.php | 103 ++- vendor/league/commonmark/src/Node/Node.php | 16 +- vendor/league/commonmark/src/Node/NodeWalker.php | 14 +- .../league/commonmark/src/Node/NodeWalkerEvent.php | 14 +- .../league/commonmark/src/Reference/Reference.php | 32 +- .../src/Reference/ReferenceInterface.php | 36 + .../commonmark/src/Reference/ReferenceMap.php | 26 +- .../src/Reference/ReferenceMapInterface.php | 49 ++ .../commonmark/src/Reference/ReferenceParser.php | 123 +++ vendor/league/commonmark/src/ReferenceParser.php | 124 --- .../league/commonmark/src/UnmatchedBlockCloser.php | 7 + .../league/commonmark/src/Util/ArrayCollection.php | 2 + .../league/commonmark/src/Util/Configuration.php | 59 +- .../src/Util/ConfigurationAwareInterface.php | 13 +- .../commonmark/src/Util/ConfigurationInterface.php | 51 ++ .../league/commonmark/src/Util/PrioritizedList.php | 3 + vendor/league/commonmark/src/Util/RegexHelper.php | 103 +-- 104 files changed, 2714 insertions(+), 2176 deletions(-) create mode 100644 vendor/league/commonmark/CHANGELOG-0.x.md delete mode 100644 vendor/league/commonmark/UPGRADE.md create mode 100644 vendor/league/commonmark/commonmark-banner.png create mode 100644 vendor/league/commonmark/src/Delimiter/DelimiterInterface.php create mode 100644 vendor/league/commonmark/src/Delimiter/Processor/DelimiterProcessorCollection.php create mode 100644 vendor/league/commonmark/src/Delimiter/Processor/DelimiterProcessorCollectionInterface.php create mode 100644 vendor/league/commonmark/src/Delimiter/Processor/DelimiterProcessorInterface.php create mode 100644 vendor/league/commonmark/src/Delimiter/Processor/EmphasisDelimiterProcessor.php create mode 100644 vendor/league/commonmark/src/Delimiter/Processor/StaggeredDelimiterProcessor.php create mode 100644 vendor/league/commonmark/src/DocParserInterface.php delete mode 100644 vendor/league/commonmark/src/DocumentProcessorInterface.php create mode 100644 vendor/league/commonmark/src/Event/AbstractEvent.php create mode 100644 vendor/league/commonmark/src/Event/DocumentParsedEvent.php create mode 100644 vendor/league/commonmark/src/Inline/AdjacentTextMerger.php delete mode 100644 vendor/league/commonmark/src/Inline/AdjoiningTextCollapser.php delete mode 100644 vendor/league/commonmark/src/Inline/Element/AbstractInlineContainer.php delete mode 100644 vendor/league/commonmark/src/Inline/Parser/EmphasisParser.php delete mode 100644 vendor/league/commonmark/src/Inline/Processor/EmphasisProcessor.php delete mode 100644 vendor/league/commonmark/src/Inline/Processor/InlineProcessorInterface.php create mode 100644 vendor/league/commonmark/src/Reference/ReferenceInterface.php create mode 100644 vendor/league/commonmark/src/Reference/ReferenceMapInterface.php create mode 100644 vendor/league/commonmark/src/Reference/ReferenceParser.php delete mode 100644 vendor/league/commonmark/src/ReferenceParser.php create mode 100644 vendor/league/commonmark/src/Util/ConfigurationInterface.php (limited to 'vendor/league/commonmark') diff --git a/vendor/league/commonmark/.phpstorm.meta.php b/vendor/league/commonmark/.phpstorm.meta.php index 1089f48a37..e797ee11b7 100644 --- a/vendor/league/commonmark/.phpstorm.meta.php +++ b/vendor/league/commonmark/.phpstorm.meta.php @@ -11,8 +11,8 @@ namespace PHPSTORM_META { - expectedArguments(\League\CommonMark\Context::setEncoding(), 0, 'UTF-8', 'ASCII', 'ISO-8859-1'); - expectedArguments(\League\CommonMark\Cursor::__construct(), 1, 'UTF-8', 'ASCII', 'ISO-8859-1'); + expectedArguments(\League\CommonMark\Context::setEncoding(), 0, 'UTF-8', 'ASCII'); + expectedArguments(\League\CommonMark\Cursor::__construct(), 1, 'UTF-8', 'ASCII'); expectedArguments(\League\CommonMark\HtmlElement::__construct(), 0, 'a', 'abbr', 'address', 'area', 'article', 'aside', 'audio', 'b', 'base', 'bdi', 'bdo', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'cite', 'code', 'col', 'colgroup', 'data', 'datalist', 'dd', 'del', 'details', 'dfn', 'dialog', 'div', 'dl', 'dt', 'em', 'embed', 'fieldset', 'figure', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'iframe', 'img', 'input', 'ins', 'kdb', 'keygen', 'label', 'legend', 'li', 'link', 'main', 'map', 'mark', 'menu', 'menuitem', 'meta', 'meter', 'nav', 'noscript', 'object', 'ol', 'optgroup', 'option', 'output', 'p', 'param', 'pre', 'progress', 'q', 's', 'samp', 'script', 'section', 'select', 'small', 'source', 'span', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'template', 'textarea', 'tfoot', 'th', 'thead', 'time', 'tr', 'track', 'u', 'ul', 'var', 'video', 'wbr'); expectedArguments(\League\CommonMark\Block\Element\Heading::__construct(), 0, 1, 2, 3, 4, 5, 6); expectedReturnValues(\League\CommonMark\Block\Element\Heading::getLevel(), 1, 2, 3, 4, 5, 6); @@ -27,4 +27,9 @@ namespace PHPSTORM_META registerArgumentsSet('league_commonmark_newline_types', \League\CommonMark\Inline\Element\Newline::HARDBREAK, \League\CommonMark\Inline\Element\Newline::SOFTBREAK); expectedArguments(\League\CommonMark\Inline\Element\Newline::__construct(), 0, argumentsSet('league_commonmark_newline_types')); expectedReturnValues(\League\CommonMark\Inline\Element\Newline::getType(), argumentsSet('league_commonmark_newline_types')); + + registerArgumentsSet('league_commonmark_options', 'renderer', 'enable_em', 'enable_strong', 'use_asterisk', 'use_underscore', 'html_input', 'allow_unsafe_links', 'max_nesting_level'); + expectedArguments(\League\CommonMark\EnvironmentInterface::getConfig(), 0, argumentsSet('league_commonmark_options')); + expectedArguments(\League\CommonMark\Util\ConfigurationInterface::get(), 0, argumentsSet('league_commonmark_options')); + expectedArguments(\League\CommonMark\Util\ConfigurationInterface::set(), 0, argumentsSet('league_commonmark_options')); } diff --git a/vendor/league/commonmark/CHANGELOG-0.x.md b/vendor/league/commonmark/CHANGELOG-0.x.md new file mode 100644 index 0000000000..16f96dd124 --- /dev/null +++ b/vendor/league/commonmark/CHANGELOG-0.x.md @@ -0,0 +1,842 @@ +# Change Log +All notable changes to this project will be documented in this file. +Updates should follow the [Keep a CHANGELOG](https://keepachangelog.com/) principles. + +## [0.19.3] - 2019-06-18 + +### Fixed + + - Fixed bug where elements with content of `"0"` wouldn't be rendered (#376) + +## [0.19.2] - 2019-05-19 + +### Fixed + + - Fixed bug where default values for nested configuration paths were inadvertently cast to strings + +## [0.19.1] - 2019-04-10 + +### Added + + - Added the missing `addExtension()` method to the new `ConfigurableEnvironmentInterface` + +### Fixed + + - Fixed extensions not being able to register other extensions + +## [0.19.0] - 2019-04-10 + +### Added + + - 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 + - Added support for trying multiple parsers per block/inline + - Extracted two new base interfaces from `Environment`: + - `EnvironmentInterface` + - `ConfigurableEnvironmentInterface` + - Extracted a new `AbstractStringContainerBlock` base class and corresponding `StringContainerInterface` from `AbstractBlock` + - Added `Cursor::getEncoding()` method + - Added `.phpstorm.meta.php` file for better IDE code completion + - Made some minor optimizations here and there + +### Changed + + - Pretty much everything now has parameter and return types (#346) + - Attributes passed to `HtmlElement` will now be escaped by default + - `Environment` is now a `final` class + - `Environment::getBlockRendererForClass()` was replaced with `Environment::getBlockRenderersForClass()` (note the added `s`) + - `Environment::getInlineRendererForClass()` was replaced with `Environment::getInlineRenderersForClass()` (note the added `s`) + - The `Environment::get____()` methods now return an iterator instead of an array + - `Context::addBlock()` no longer returns the same block instance you passed into the method, as this served no useful purpose + - `RegexHelper::isEscapable()` no longer accepts `null` values + - `Node::replaceChildren()` now accepts any type of `iterable`, not just `array`s + - Some block elements now extend `AbstractStringContainerBlock` instead of `AbstractBlock` + - `InlineContainerInterface` now extends the new `StringContainerInterface` + - The `handleRemainingContents()` method (formerly on `AbstractBlock`, now on `AbstractStringContainerBlock`) is now an `abstract method + - The `InlineParserContext` constructor now requires an `AbstractStringContainerBlock` instead of an `AbstractBlock` + +### Removed + + - Removed support for PHP 5.6 and 7.0 (#346) + - Removed support for `add()`ing parsers with just the target block/inline class name - you need to include the full namespace now + - Removed the following unused methods from `Environment`: + - `getInlineParser($name)` + - `getInlineParsers()` + - `createInlineParserEngine()` + - Removed the unused `getName()` methods: + - `AbstractBlockParser::getName()` + - `AbstractInlineParser::getName()` + - `BlockParserInterface::getName()` + - `InlinerParserInterface::getName()` + - Removed the now-useless classes: + - `AbstractBlockParser` + - `AbstractInlinerParser` + - `InlineContainer` + - Removed the `AbstractBlock::acceptsLines()` method + - Removed the now-useless constructor from `AbstractBlock` + - Removed previously-deprecated functionality: + - `InlineContainer` class + - `RegexHelper::$instance` + - `RegexHelper::getInstance()` + - `RegexHelper::getPartialRegex()` + - `RegexHelper::getHtmlTagRegex()` + - `RegexHelper::getLinkTitleRegex()` + - `RegexHelper::getLinkDestinationBracesRegex()` + - `RegexHelper::getThematicBreakRegex()` + - Removed the second `$preserveEntities` parameter from `Xml:escape()` + +## [0.18.5] - 2019-03-28 + +### Fixed + + - Fixed the adjoining `Text` collapser not handling the full tree (thephpleague/commonmark-ext-autolink#10) + +## [0.18.4] - 2019-03-23 + +### Changed + + - Modified how URL normalization decodes certain characters in order to align with the JS library's output + - Disallowed unescaped `(` in parenthesized link title + +### Fixed + + - Fixed two exponential backtracking issues + +## [0.18.3] - 2019-03-21 + +This is a **security update** release. + +### Changed + + - XML/HTML entities in attributes will no longer be preserved when rendering (#353) + +### Fixed + + - Fix XSS vulnerability caused by improper preservation of entities when rendering (#353) + +### Deprecated + + - Deprecated the `$preserveEntites` argument of `Xml::escape()` for removal in the next release (#353) + +## [0.18.2] - 2019-03-16 + +### Fixed + + - Fixed adjoining `Text` elements not being collapsed after delimiter processing + +### Deprecated + + - Deprecated the `CommonmarkConverter::VERSION` constant for removal in 1.0.0 + +## [0.18.1] - 2018-12-29 + +This is a **security update** release. + +### Fixed + + - Fix XSS vulnerability caused by URL normalization not handling/encoding newlines properly (#337, CVE-2018-20583) + +## [0.18.0] - 2018-09-18 + +### Added + + - Added `ConverterInterface` to `Converter` and `CommonMarkConverter` (#330) + - Added `ListItem::getListData()` method (#329) + +### Changed + + - Links with `target="_blank"` will also get `rel="noopener noreferrer"` by default (#331) + - Implemented several performance optimizations (#324) + +## [0.17.5] - 2018-03-29 + +### Fixed + + - Fixed incorrect version constant value (again) + - Fixed release checklist to prevent the above from happening + - Fixed incorrect dates in CHANGELOG + +## [0.17.4] - 2018-03-28 + +### Added + + - Added `ListBlock::setTight()` method + +## [0.17.3] - 2018-03-26 + +### Fixed + + - Fixed incorrect version constant value + +## [0.17.2] - 2018-03-25 + +### Added + + - Added new `RegexHelper::isEscapable()` method + +### Fixed + + - Fixed spec compliance bug where escaped spaces should not be allowed in link destinations + +## [0.17.1] - 2018-03-18 + +### Added + + - Added a new constant containing the current version: `CommonMarkConverter::VERSION` (#314) + +## [0.17.0] - 2017-12-30 + +This release contains several breaking changes and a minimum PHP version bump - see 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] - 2017-10-30 + +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 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] - 2017-10-26 + +### Fixed + + - Improved performance of `Cursor::advanceBy()` (for a 16% performance boost) + +## [0.15.6] - 2017-08-08 + +### Fixed + + - Fixed URI normalization not properly encoding/decoding special characters in certain cases (#287) + +## [0.15.5] - 2017-08-05 + +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 `
` (it shouldn't) and not matching `