From 544ef3bc588d4180d7ecad15bdacd43813a7c5c5 Mon Sep 17 00:00:00 2001 From: Mario Date: Thu, 12 Dec 2019 14:51:10 +0000 Subject: update composer libs and minor notifications display fixes --- vendor/michelf/php-markdown/.editorconfig | 11 + vendor/michelf/php-markdown/.scrutinizer.yml | 36 + vendor/michelf/php-markdown/.travis.yml | 29 + vendor/michelf/php-markdown/License.md | 2 +- vendor/michelf/php-markdown/Michelf/Markdown.php | 39 +- .../michelf/php-markdown/Michelf/MarkdownExtra.php | 293 ++++--- .../php-markdown/Michelf/MarkdownInterface.php | 2 +- vendor/michelf/php-markdown/Readme.md | 44 +- vendor/michelf/php-markdown/Readme.php | 12 +- vendor/michelf/php-markdown/composer.json | 3 + vendor/michelf/php-markdown/phpunit.xml.dist | 24 + vendor/michelf/php-markdown/test/bootstrap.php | 6 + .../test/helpers/MarkdownTestHelper.php | 267 ++++++ .../test/integration/PhpMarkdownTest.php | 173 ++++ .../markdown.mdtest/Amps and angle encoding.text | 21 + .../markdown.mdtest/Amps and angle encoding.xhtml | 17 + .../test/resources/markdown.mdtest/Auto links.text | 13 + .../resources/markdown.mdtest/Auto links.xhtml | 18 + .../markdown.mdtest/Backslash escapes.text | 120 +++ .../markdown.mdtest/Backslash escapes.xhtml | 118 +++ .../Blockquotes with code blocks.text | 11 + .../Blockquotes with code blocks.xhtml | 15 + .../resources/markdown.mdtest/Code Blocks.text | 14 + .../resources/markdown.mdtest/Code Blocks.xhtml | 18 + .../test/resources/markdown.mdtest/Code Spans.text | 5 + .../resources/markdown.mdtest/Code Spans.xhtml | 5 + ...rd-wrapped paragraphs with list-like lines.text | 8 + ...d-wrapped paragraphs with list-like lines.xhtml | 8 + .../markdown.mdtest/Horizontal rules.text | 67 ++ .../markdown.mdtest/Horizontal rules.xhtml | 71 ++ .../test/resources/markdown.mdtest/Images.text | 26 + .../test/resources/markdown.mdtest/Images.xhtml | 21 + .../markdown.mdtest/Inline HTML (Advanced).text | 30 + .../markdown.mdtest/Inline HTML (Advanced).xhtml | 30 + .../markdown.mdtest/Inline HTML (Simple).html | 72 ++ .../markdown.mdtest/Inline HTML (Simple).text | 69 ++ .../markdown.mdtest/Inline HTML comments.html | 13 + .../markdown.mdtest/Inline HTML comments.text | 13 + .../markdown.mdtest/Links, inline style.text | 24 + .../markdown.mdtest/Links, inline style.xhtml | 23 + .../markdown.mdtest/Links, reference style.text | 71 ++ .../markdown.mdtest/Links, reference style.xhtml | 52 ++ .../Links, shortcut references.text | 20 + .../Links, shortcut references.xhtml | 9 + .../markdown.mdtest/Literal quotes in titles.text | 7 + .../markdown.mdtest/Literal quotes in titles.xhtml | 3 + .../Markdown Documentation - Basics.text | 306 +++++++ .../Markdown Documentation - Basics.xhtml | 314 +++++++ .../Markdown Documentation - Syntax.text | 888 +++++++++++++++++++ .../Markdown Documentation - Syntax.xhtml | 942 +++++++++++++++++++++ .../markdown.mdtest/Nested blockquotes.text | 5 + .../markdown.mdtest/Nested blockquotes.xhtml | 9 + .../Ordered and unordered lists.text | 131 +++ .../Ordered and unordered lists.xhtml | 148 ++++ .../markdown.mdtest/Strong and em together.text | 7 + .../markdown.mdtest/Strong and em together.xhtml | 7 + .../test/resources/markdown.mdtest/Tabs.text | 21 + .../test/resources/markdown.mdtest/Tabs.xhtml | 25 + .../test/resources/markdown.mdtest/Tidyness.text | 5 + .../test/resources/markdown.mdtest/Tidyness.xhtml | 8 + .../resources/php-markdown-extra.mdtest/Abbr.text | 31 + .../resources/php-markdown-extra.mdtest/Abbr.xhtml | 15 + .../Backtick Fenced Code Blocks Special Cases.text | 69 ++ ...Backtick Fenced Code Blocks Special Cases.xhtml | 61 ++ .../Backtick Fenced Code Blocks.text | 123 +++ .../Backtick Fenced Code Blocks.xhtml | 109 +++ .../Definition Lists.text | 115 +++ .../Definition Lists.xhtml | 155 ++++ .../php-markdown-extra.mdtest/Emphasis.text | 100 +++ .../php-markdown-extra.mdtest/Emphasis.xhtml | 106 +++ .../php-markdown-extra.mdtest/Footnotes.text | 70 ++ .../php-markdown-extra.mdtest/Footnotes.xhtml | 103 +++ .../Headers with attributes.text | 41 + .../Headers with attributes.xhtml | 37 + .../Inline HTML with Markdown content.text | 110 +++ .../Inline HTML with Markdown content.xhtml | 131 +++ .../Link & Image Attributes.text | 10 + .../Link & Image Attributes.xhtml | 8 + .../php-markdown-extra.mdtest/Tables.text | 113 +++ .../php-markdown-extra.mdtest/Tables.xhtml | 333 ++++++++ .../Tilde Fenced Code Blocks Special Cases.text | 69 ++ .../Tilde Fenced Code Blocks Special Cases.xhtml | 61 ++ .../Tilde Fenced Code Blocks.text | 123 +++ .../Tilde Fenced Code Blocks.xhtml | 109 +++ .../php-markdown.mdtest/Adjacent Lists.text | 10 + .../php-markdown.mdtest/Adjacent Lists.xhtml | 19 + .../resources/php-markdown.mdtest/Auto Links.text | 3 + .../resources/php-markdown.mdtest/Auto Links.xhtml | 3 + .../php-markdown.mdtest/Backslash escapes.text | 1 + .../php-markdown.mdtest/Backslash escapes.xhtml | 1 + .../resources/php-markdown.mdtest/Code Spans.text | 6 + .../resources/php-markdown.mdtest/Code Spans.xhtml | 6 + .../Code block in a list item.text | 15 + .../Code block in a list item.xhtml | 18 + .../Code block on second line.text | 2 + .../Code block on second line.xhtml | 2 + .../Code block regressions.text | 15 + .../Code block regressions.xhtml | 18 + .../php-markdown.mdtest/Email auto links.text | 24 + .../php-markdown.mdtest/Email auto links.xhtml | 23 + .../resources/php-markdown.mdtest/Emphasis.text | 101 +++ .../resources/php-markdown.mdtest/Emphasis.xhtml | 105 +++ .../php-markdown.mdtest/Empty List Item.text | 35 + .../php-markdown.mdtest/Empty List Item.xhtml | 47 + .../resources/php-markdown.mdtest/Headers.text | 9 + .../resources/php-markdown.mdtest/Headers.xhtml | 39 + .../php-markdown.mdtest/Horizontal Rules.text | 29 + .../php-markdown.mdtest/Horizontal Rules.xhtml | 30 + .../php-markdown.mdtest/Inline HTML (Simple).html | 25 + .../php-markdown.mdtest/Inline HTML (Simple).text | 25 + .../php-markdown.mdtest/Inline HTML (Span).text | 4 + .../php-markdown.mdtest/Inline HTML (Span).xhtml | 4 + .../php-markdown.mdtest/Inline HTML comments.html | 9 + .../php-markdown.mdtest/Inline HTML comments.text | 9 + .../resources/php-markdown.mdtest/Ins & del.text | 17 + .../resources/php-markdown.mdtest/Ins & del.xhtml | 17 + .../php-markdown.mdtest/Links, inline style.text | 9 + .../php-markdown.mdtest/Links, inline style.xhtml | 7 + .../resources/php-markdown.mdtest/MD5 Hashes.text | 11 + .../resources/php-markdown.mdtest/MD5 Hashes.xhtml | 11 + .../php-markdown.mdtest/Mixed OLs and ULs.text | 13 + .../php-markdown.mdtest/Mixed OLs and ULs.xhtml | 21 + .../resources/php-markdown.mdtest/Nesting.text | 11 + .../resources/php-markdown.mdtest/Nesting.xhtml | 11 + .../php-markdown.mdtest/PHP-Specific Bugs.text | 22 + .../php-markdown.mdtest/PHP-Specific Bugs.xhtml | 17 + .../php-markdown.mdtest/Parens in URL.text | 14 + .../php-markdown.mdtest/Parens in URL.xhtml | 11 + .../php-markdown.mdtest/Quotes in attributes.text | 5 + .../php-markdown.mdtest/Quotes in attributes.xhtml | 5 + .../php-markdown.mdtest/Tight blocks.text | 1 + .../php-markdown.mdtest/Tight blocks.xhtml | 21 + .../php-markdown.mdtest/XML empty tag.text | 2 + .../php-markdown.mdtest/XML empty tag.xhtml | 2 + .../php-markdown/test/unit/MarkdownExtraTest.php | 51 ++ 135 files changed, 7754 insertions(+), 133 deletions(-) create mode 100644 vendor/michelf/php-markdown/.editorconfig create mode 100644 vendor/michelf/php-markdown/.scrutinizer.yml create mode 100644 vendor/michelf/php-markdown/.travis.yml create mode 100644 vendor/michelf/php-markdown/phpunit.xml.dist create mode 100644 vendor/michelf/php-markdown/test/bootstrap.php create mode 100644 vendor/michelf/php-markdown/test/helpers/MarkdownTestHelper.php create mode 100644 vendor/michelf/php-markdown/test/integration/PhpMarkdownTest.php create mode 100644 vendor/michelf/php-markdown/test/resources/markdown.mdtest/Amps and angle encoding.text create mode 100644 vendor/michelf/php-markdown/test/resources/markdown.mdtest/Amps and angle encoding.xhtml create mode 100644 vendor/michelf/php-markdown/test/resources/markdown.mdtest/Auto links.text create mode 100644 vendor/michelf/php-markdown/test/resources/markdown.mdtest/Auto links.xhtml create mode 100644 vendor/michelf/php-markdown/test/resources/markdown.mdtest/Backslash escapes.text create mode 100644 vendor/michelf/php-markdown/test/resources/markdown.mdtest/Backslash escapes.xhtml create mode 100644 vendor/michelf/php-markdown/test/resources/markdown.mdtest/Blockquotes with code blocks.text create mode 100644 vendor/michelf/php-markdown/test/resources/markdown.mdtest/Blockquotes with code blocks.xhtml create mode 100644 vendor/michelf/php-markdown/test/resources/markdown.mdtest/Code Blocks.text create mode 100644 vendor/michelf/php-markdown/test/resources/markdown.mdtest/Code Blocks.xhtml create mode 100644 vendor/michelf/php-markdown/test/resources/markdown.mdtest/Code Spans.text create mode 100644 vendor/michelf/php-markdown/test/resources/markdown.mdtest/Code Spans.xhtml create mode 100644 vendor/michelf/php-markdown/test/resources/markdown.mdtest/Hard-wrapped paragraphs with list-like lines.text create mode 100644 vendor/michelf/php-markdown/test/resources/markdown.mdtest/Hard-wrapped paragraphs with list-like lines.xhtml create mode 100644 vendor/michelf/php-markdown/test/resources/markdown.mdtest/Horizontal rules.text create mode 100644 vendor/michelf/php-markdown/test/resources/markdown.mdtest/Horizontal rules.xhtml create mode 100644 vendor/michelf/php-markdown/test/resources/markdown.mdtest/Images.text create mode 100644 vendor/michelf/php-markdown/test/resources/markdown.mdtest/Images.xhtml create mode 100644 vendor/michelf/php-markdown/test/resources/markdown.mdtest/Inline HTML (Advanced).text create mode 100644 vendor/michelf/php-markdown/test/resources/markdown.mdtest/Inline HTML (Advanced).xhtml create mode 100644 vendor/michelf/php-markdown/test/resources/markdown.mdtest/Inline HTML (Simple).html create mode 100644 vendor/michelf/php-markdown/test/resources/markdown.mdtest/Inline HTML (Simple).text create mode 100644 vendor/michelf/php-markdown/test/resources/markdown.mdtest/Inline HTML comments.html create mode 100644 vendor/michelf/php-markdown/test/resources/markdown.mdtest/Inline HTML comments.text create mode 100644 vendor/michelf/php-markdown/test/resources/markdown.mdtest/Links, inline style.text create mode 100644 vendor/michelf/php-markdown/test/resources/markdown.mdtest/Links, inline style.xhtml create mode 100644 vendor/michelf/php-markdown/test/resources/markdown.mdtest/Links, reference style.text create mode 100644 vendor/michelf/php-markdown/test/resources/markdown.mdtest/Links, reference style.xhtml create mode 100644 vendor/michelf/php-markdown/test/resources/markdown.mdtest/Links, shortcut references.text create mode 100644 vendor/michelf/php-markdown/test/resources/markdown.mdtest/Links, shortcut references.xhtml create mode 100644 vendor/michelf/php-markdown/test/resources/markdown.mdtest/Literal quotes in titles.text create mode 100644 vendor/michelf/php-markdown/test/resources/markdown.mdtest/Literal quotes in titles.xhtml create mode 100644 vendor/michelf/php-markdown/test/resources/markdown.mdtest/Markdown Documentation - Basics.text create mode 100644 vendor/michelf/php-markdown/test/resources/markdown.mdtest/Markdown Documentation - Basics.xhtml create mode 100644 vendor/michelf/php-markdown/test/resources/markdown.mdtest/Markdown Documentation - Syntax.text create mode 100644 vendor/michelf/php-markdown/test/resources/markdown.mdtest/Markdown Documentation - Syntax.xhtml create mode 100644 vendor/michelf/php-markdown/test/resources/markdown.mdtest/Nested blockquotes.text create mode 100644 vendor/michelf/php-markdown/test/resources/markdown.mdtest/Nested blockquotes.xhtml create mode 100644 vendor/michelf/php-markdown/test/resources/markdown.mdtest/Ordered and unordered lists.text create mode 100644 vendor/michelf/php-markdown/test/resources/markdown.mdtest/Ordered and unordered lists.xhtml create mode 100644 vendor/michelf/php-markdown/test/resources/markdown.mdtest/Strong and em together.text create mode 100644 vendor/michelf/php-markdown/test/resources/markdown.mdtest/Strong and em together.xhtml create mode 100644 vendor/michelf/php-markdown/test/resources/markdown.mdtest/Tabs.text create mode 100644 vendor/michelf/php-markdown/test/resources/markdown.mdtest/Tabs.xhtml create mode 100644 vendor/michelf/php-markdown/test/resources/markdown.mdtest/Tidyness.text create mode 100644 vendor/michelf/php-markdown/test/resources/markdown.mdtest/Tidyness.xhtml create mode 100644 vendor/michelf/php-markdown/test/resources/php-markdown-extra.mdtest/Abbr.text create mode 100644 vendor/michelf/php-markdown/test/resources/php-markdown-extra.mdtest/Abbr.xhtml create mode 100644 vendor/michelf/php-markdown/test/resources/php-markdown-extra.mdtest/Backtick Fenced Code Blocks Special Cases.text create mode 100644 vendor/michelf/php-markdown/test/resources/php-markdown-extra.mdtest/Backtick Fenced Code Blocks Special Cases.xhtml create mode 100644 vendor/michelf/php-markdown/test/resources/php-markdown-extra.mdtest/Backtick Fenced Code Blocks.text create mode 100644 vendor/michelf/php-markdown/test/resources/php-markdown-extra.mdtest/Backtick Fenced Code Blocks.xhtml create mode 100644 vendor/michelf/php-markdown/test/resources/php-markdown-extra.mdtest/Definition Lists.text create mode 100644 vendor/michelf/php-markdown/test/resources/php-markdown-extra.mdtest/Definition Lists.xhtml create mode 100644 vendor/michelf/php-markdown/test/resources/php-markdown-extra.mdtest/Emphasis.text create mode 100644 vendor/michelf/php-markdown/test/resources/php-markdown-extra.mdtest/Emphasis.xhtml create mode 100644 vendor/michelf/php-markdown/test/resources/php-markdown-extra.mdtest/Footnotes.text create mode 100644 vendor/michelf/php-markdown/test/resources/php-markdown-extra.mdtest/Footnotes.xhtml create mode 100644 vendor/michelf/php-markdown/test/resources/php-markdown-extra.mdtest/Headers with attributes.text create mode 100644 vendor/michelf/php-markdown/test/resources/php-markdown-extra.mdtest/Headers with attributes.xhtml create mode 100644 vendor/michelf/php-markdown/test/resources/php-markdown-extra.mdtest/Inline HTML with Markdown content.text create mode 100644 vendor/michelf/php-markdown/test/resources/php-markdown-extra.mdtest/Inline HTML with Markdown content.xhtml create mode 100644 vendor/michelf/php-markdown/test/resources/php-markdown-extra.mdtest/Link & Image Attributes.text create mode 100644 vendor/michelf/php-markdown/test/resources/php-markdown-extra.mdtest/Link & Image Attributes.xhtml create mode 100644 vendor/michelf/php-markdown/test/resources/php-markdown-extra.mdtest/Tables.text create mode 100644 vendor/michelf/php-markdown/test/resources/php-markdown-extra.mdtest/Tables.xhtml create mode 100644 vendor/michelf/php-markdown/test/resources/php-markdown-extra.mdtest/Tilde Fenced Code Blocks Special Cases.text create mode 100644 vendor/michelf/php-markdown/test/resources/php-markdown-extra.mdtest/Tilde Fenced Code Blocks Special Cases.xhtml create mode 100644 vendor/michelf/php-markdown/test/resources/php-markdown-extra.mdtest/Tilde Fenced Code Blocks.text create mode 100644 vendor/michelf/php-markdown/test/resources/php-markdown-extra.mdtest/Tilde Fenced Code Blocks.xhtml create mode 100644 vendor/michelf/php-markdown/test/resources/php-markdown.mdtest/Adjacent Lists.text create mode 100644 vendor/michelf/php-markdown/test/resources/php-markdown.mdtest/Adjacent Lists.xhtml create mode 100644 vendor/michelf/php-markdown/test/resources/php-markdown.mdtest/Auto Links.text create mode 100644 vendor/michelf/php-markdown/test/resources/php-markdown.mdtest/Auto Links.xhtml create mode 100644 vendor/michelf/php-markdown/test/resources/php-markdown.mdtest/Backslash escapes.text create mode 100644 vendor/michelf/php-markdown/test/resources/php-markdown.mdtest/Backslash escapes.xhtml create mode 100644 vendor/michelf/php-markdown/test/resources/php-markdown.mdtest/Code Spans.text create mode 100644 vendor/michelf/php-markdown/test/resources/php-markdown.mdtest/Code Spans.xhtml create mode 100644 vendor/michelf/php-markdown/test/resources/php-markdown.mdtest/Code block in a list item.text create mode 100644 vendor/michelf/php-markdown/test/resources/php-markdown.mdtest/Code block in a list item.xhtml create mode 100644 vendor/michelf/php-markdown/test/resources/php-markdown.mdtest/Code block on second line.text create mode 100644 vendor/michelf/php-markdown/test/resources/php-markdown.mdtest/Code block on second line.xhtml create mode 100644 vendor/michelf/php-markdown/test/resources/php-markdown.mdtest/Code block regressions.text create mode 100644 vendor/michelf/php-markdown/test/resources/php-markdown.mdtest/Code block regressions.xhtml create mode 100644 vendor/michelf/php-markdown/test/resources/php-markdown.mdtest/Email auto links.text create mode 100644 vendor/michelf/php-markdown/test/resources/php-markdown.mdtest/Email auto links.xhtml create mode 100644 vendor/michelf/php-markdown/test/resources/php-markdown.mdtest/Emphasis.text create mode 100644 vendor/michelf/php-markdown/test/resources/php-markdown.mdtest/Emphasis.xhtml create mode 100644 vendor/michelf/php-markdown/test/resources/php-markdown.mdtest/Empty List Item.text create mode 100644 vendor/michelf/php-markdown/test/resources/php-markdown.mdtest/Empty List Item.xhtml create mode 100644 vendor/michelf/php-markdown/test/resources/php-markdown.mdtest/Headers.text create mode 100644 vendor/michelf/php-markdown/test/resources/php-markdown.mdtest/Headers.xhtml create mode 100644 vendor/michelf/php-markdown/test/resources/php-markdown.mdtest/Horizontal Rules.text create mode 100644 vendor/michelf/php-markdown/test/resources/php-markdown.mdtest/Horizontal Rules.xhtml create mode 100644 vendor/michelf/php-markdown/test/resources/php-markdown.mdtest/Inline HTML (Simple).html create mode 100644 vendor/michelf/php-markdown/test/resources/php-markdown.mdtest/Inline HTML (Simple).text create mode 100644 vendor/michelf/php-markdown/test/resources/php-markdown.mdtest/Inline HTML (Span).text create mode 100644 vendor/michelf/php-markdown/test/resources/php-markdown.mdtest/Inline HTML (Span).xhtml create mode 100644 vendor/michelf/php-markdown/test/resources/php-markdown.mdtest/Inline HTML comments.html create mode 100644 vendor/michelf/php-markdown/test/resources/php-markdown.mdtest/Inline HTML comments.text create mode 100644 vendor/michelf/php-markdown/test/resources/php-markdown.mdtest/Ins & del.text create mode 100644 vendor/michelf/php-markdown/test/resources/php-markdown.mdtest/Ins & del.xhtml create mode 100644 vendor/michelf/php-markdown/test/resources/php-markdown.mdtest/Links, inline style.text create mode 100644 vendor/michelf/php-markdown/test/resources/php-markdown.mdtest/Links, inline style.xhtml create mode 100644 vendor/michelf/php-markdown/test/resources/php-markdown.mdtest/MD5 Hashes.text create mode 100644 vendor/michelf/php-markdown/test/resources/php-markdown.mdtest/MD5 Hashes.xhtml create mode 100644 vendor/michelf/php-markdown/test/resources/php-markdown.mdtest/Mixed OLs and ULs.text create mode 100644 vendor/michelf/php-markdown/test/resources/php-markdown.mdtest/Mixed OLs and ULs.xhtml create mode 100644 vendor/michelf/php-markdown/test/resources/php-markdown.mdtest/Nesting.text create mode 100644 vendor/michelf/php-markdown/test/resources/php-markdown.mdtest/Nesting.xhtml create mode 100644 vendor/michelf/php-markdown/test/resources/php-markdown.mdtest/PHP-Specific Bugs.text create mode 100644 vendor/michelf/php-markdown/test/resources/php-markdown.mdtest/PHP-Specific Bugs.xhtml create mode 100644 vendor/michelf/php-markdown/test/resources/php-markdown.mdtest/Parens in URL.text create mode 100644 vendor/michelf/php-markdown/test/resources/php-markdown.mdtest/Parens in URL.xhtml create mode 100644 vendor/michelf/php-markdown/test/resources/php-markdown.mdtest/Quotes in attributes.text create mode 100644 vendor/michelf/php-markdown/test/resources/php-markdown.mdtest/Quotes in attributes.xhtml create mode 100644 vendor/michelf/php-markdown/test/resources/php-markdown.mdtest/Tight blocks.text create mode 100644 vendor/michelf/php-markdown/test/resources/php-markdown.mdtest/Tight blocks.xhtml create mode 100644 vendor/michelf/php-markdown/test/resources/php-markdown.mdtest/XML empty tag.text create mode 100644 vendor/michelf/php-markdown/test/resources/php-markdown.mdtest/XML empty tag.xhtml create mode 100644 vendor/michelf/php-markdown/test/unit/MarkdownExtraTest.php (limited to 'vendor/michelf/php-markdown') diff --git a/vendor/michelf/php-markdown/.editorconfig b/vendor/michelf/php-markdown/.editorconfig new file mode 100644 index 000000000..179d40c91 --- /dev/null +++ b/vendor/michelf/php-markdown/.editorconfig @@ -0,0 +1,11 @@ +# EditorConfig is awesome: https://EditorConfig.org +root = true + +[*] +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = false + +[*.php] +indent_style = tab +insert_final_newline = true diff --git a/vendor/michelf/php-markdown/.scrutinizer.yml b/vendor/michelf/php-markdown/.scrutinizer.yml new file mode 100644 index 000000000..b4f5dfb9e --- /dev/null +++ b/vendor/michelf/php-markdown/.scrutinizer.yml @@ -0,0 +1,36 @@ +build: + environment: + php: + version: '7.0.20' + nodes: + analysis: + project_setup: + override: + - 'true' + tests: + override: + - + command: 'vendor/bin/phpunit --coverage-clover=clover.xml' + coverage: + file: 'clover.xml' + format: 'clover' + - + command: phpcs-run + use_website_config: true + environment: + node: + version: 6.0.0 + tests: true +filter: + excluded_paths: + - 'test/*' +checks: + php: true +coding_style: + php: + indentation: + general: + use_tabs: true + spaces: + around_operators: + concatenation: true diff --git a/vendor/michelf/php-markdown/.travis.yml b/vendor/michelf/php-markdown/.travis.yml new file mode 100644 index 000000000..d46714787 --- /dev/null +++ b/vendor/michelf/php-markdown/.travis.yml @@ -0,0 +1,29 @@ +language: php + +sudo: false + +cache: + directories: + - $HOME/.composer/ + +# Run tests against all these PHP versions +# TODO: When it becomes possible in TravisCI, switch 7.4snapshot to plain 7.4 +php: + - 5.4 + - 5.5 + - 5.6 + - 7.0 + - 7.1 + - 7.2 + - 7.3 + - 7.4snapshot + - hhvm + +before_script: + - composer install --prefer-dist + +script: + - vendor/bin/phpunit --log-junit=phpunit.log + +notifications: + email: false diff --git a/vendor/michelf/php-markdown/License.md b/vendor/michelf/php-markdown/License.md index b3df08f99..16bbd5400 100644 --- a/vendor/michelf/php-markdown/License.md +++ b/vendor/michelf/php-markdown/License.md @@ -1,5 +1,5 @@ PHP Markdown Lib -Copyright (c) 2004-2018 Michel Fortin +Copyright (c) 2004-2019 Michel Fortin All rights reserved. diff --git a/vendor/michelf/php-markdown/Michelf/Markdown.php b/vendor/michelf/php-markdown/Michelf/Markdown.php index e4c2c2361..43b3c79e8 100644 --- a/vendor/michelf/php-markdown/Michelf/Markdown.php +++ b/vendor/michelf/php-markdown/Michelf/Markdown.php @@ -4,7 +4,7 @@ * * @package php-markdown * @author Michel Fortin - * @copyright 2004-2018 Michel Fortin + * @copyright 2004-2019 Michel Fortin * @copyright (Original Markdown) 2004-2006 John Gruber */ @@ -18,7 +18,7 @@ class Markdown implements MarkdownInterface { * Define the package version * @var string */ - const MARKDOWNLIB_VERSION = "1.8.0"; + const MARKDOWNLIB_VERSION = "1.9.0"; /** * Simple function interface - Initialize the parser and return the result @@ -85,25 +85,25 @@ class Markdown implements MarkdownInterface { /** * Optional filter function for URLs - * @var callable + * @var callable|null */ public $url_filter_func = null; /** * Optional header id="" generation callback function. - * @var callable + * @var callable|null */ public $header_id_func = null; /** * Optional function for converting code block content to HTML - * @var callable + * @var callable|null */ public $code_block_content_func = null; /** * Optional function for converting code span content to HTML. - * @var callable + * @var callable|null */ public $code_span_content_func = null; @@ -767,16 +767,15 @@ class Markdown implements MarkdownInterface { * @return string */ protected function _doAnchors_inline_callback($matches) { - $whole_match = $matches[1]; $link_text = $this->runSpanGamut($matches[2]); - $url = $matches[3] == '' ? $matches[4] : $matches[3]; + $url = $matches[3] === '' ? $matches[4] : $matches[3]; $title =& $matches[7]; // If the URL was of the form it got caught by the HTML // tag parser and hashed. Need to reverse the process before using // the URL. $unhashed = $this->unhash($url); - if ($unhashed != $url) + if ($unhashed !== $url) $url = preg_replace('/^<(.*)>$/', '\1', $unhashed); $url = $this->encodeURLAttribute($url); @@ -952,7 +951,7 @@ class Markdown implements MarkdownInterface { return $matches[0]; } - $level = $matches[2]{0} == '=' ? 1 : 2; + $level = $matches[2][0] == '=' ? 1 : 2; // ID attribute generation $idAtt = $this->_generateIdFromHeaderValue($matches[1]); @@ -1218,7 +1217,7 @@ class Markdown implements MarkdownInterface { $codeblock = $matches[1]; $codeblock = $this->outdent($codeblock); - if ($this->code_block_content_func) { + if (is_callable($this->code_block_content_func)) { $codeblock = call_user_func($this->code_block_content_func, $codeblock, ""); } else { $codeblock = htmlspecialchars($codeblock, ENT_NOQUOTES); @@ -1237,7 +1236,7 @@ class Markdown implements MarkdownInterface { * @return string */ protected function makeCodeSpan($code) { - if ($this->code_span_content_func) { + if (is_callable($this->code_span_content_func)) { $code = call_user_func($this->code_span_content_func, $code); } else { $code = htmlspecialchars(trim($code), ENT_NOQUOTES); @@ -1358,7 +1357,7 @@ class Markdown implements MarkdownInterface { } else { // Other closing marker: close one em or strong and // change current token state to match the other - $token_stack[0] = str_repeat($token{0}, 3-$token_len); + $token_stack[0] = str_repeat($token[0], 3-$token_len); $tag = $token_len == 2 ? "strong" : "em"; $span = $text_stack[0]; $span = $this->runSpanGamut($span); @@ -1383,7 +1382,7 @@ class Markdown implements MarkdownInterface { } else { // Reached opening three-char emphasis marker. Push on token // stack; will be handled by the special condition above. - $em = $token{0}; + $em = $token[0]; $strong = "$em$em"; array_unshift($token_stack, $token); array_unshift($text_stack, ''); @@ -1576,11 +1575,11 @@ class Markdown implements MarkdownInterface { * This function is *not* suitable for attributes enclosed in single quotes. * * @param string $url - * @param string &$text Passed by reference + * @param string $text Passed by reference * @return string URL */ protected function encodeURLAttribute($url, &$text = null) { - if ($this->url_filter_func) { + if (is_callable($this->url_filter_func)) { $url = call_user_func($this->url_filter_func, $url); } @@ -1694,7 +1693,7 @@ class Markdown implements MarkdownInterface { * attribute special characters by Allan Odgaard. * * @param string $text - * @param string &$tail + * @param string $tail Passed by reference * @param integer $head_length * @return string */ @@ -1792,13 +1791,13 @@ class Markdown implements MarkdownInterface { * Handle $token provided by parseSpan by determining its nature and * returning the corresponding value that should replace it. * @param string $token - * @param string &$str + * @param string $str Passed by reference * @return string */ protected function handleSpanToken($token, &$str) { - switch ($token{0}) { + switch ($token[0]) { case "\\": - return $this->hashPart("&#". ord($token{1}). ";"); + return $this->hashPart("&#". ord($token[1]). ";"); case "`": // Search for end marker in remaining text. if (preg_match('/^(.*?[^`])'.preg_quote($token).'(?!`)(.*)$/sm', diff --git a/vendor/michelf/php-markdown/Michelf/MarkdownExtra.php b/vendor/michelf/php-markdown/Michelf/MarkdownExtra.php index a8f7f2c5d..62d25f38e 100644 --- a/vendor/michelf/php-markdown/Michelf/MarkdownExtra.php +++ b/vendor/michelf/php-markdown/Michelf/MarkdownExtra.php @@ -4,7 +4,7 @@ * * @package php-markdown * @author Michel Fortin - * @copyright 2004-2018 Michel Fortin + * @copyright 2004-2019 Michel Fortin * @copyright (Original Markdown) 2004-2006 John Gruber */ @@ -25,11 +25,10 @@ class MarkdownExtra extends \Michelf\Markdown { public $fn_id_prefix = ""; /** - * Optional title attribute for footnote links and backlinks. + * Optional title attribute for footnote links. * @var string */ - public $fn_link_title = ""; - public $fn_backlink_title = ""; + public $fn_link_title = ""; /** * Optional class attribute for footnote links and backlinks. @@ -42,10 +41,22 @@ class MarkdownExtra extends \Michelf\Markdown { * Content to be displayed within footnote backlinks. The default is '↩'; * the U+FE0E on the end is a Unicode variant selector used to prevent iOS * from displaying the arrow character as an emoji. + * Optionally use '^^' and '%%' to refer to the footnote number and + * reference number respectively. {@see parseFootnotePlaceholders()} * @var string */ public $fn_backlink_html = '↩︎'; + /** + * Optional title and aria-label attributes for footnote backlinks for + * added accessibility (to ensure backlink uniqueness). + * Use '^^' and '%%' to refer to the footnote number and reference number + * respectively. {@see parseFootnotePlaceholders()} + * @var string + */ + public $fn_backlink_title = ""; + public $fn_backlink_label = ""; + /** * Class name for table cell alignment (%% replaced left/center/right) * For instance: 'go-%%' becomes 'go-left' or 'go-right' or 'go-center' @@ -79,6 +90,27 @@ class MarkdownExtra extends \Michelf\Markdown { */ public $hashtag_protection = false; + /** + * Determines whether footnotes should be appended to the end of the document. + * If true, footnote html can be retrieved from $this->footnotes_assembled. + * @var boolean + */ + public $omit_footnotes = false; + + + /** + * After parsing, the HTML for the list of footnotes appears here. + * This is available only if $omit_footnotes == true. + * + * Note: when placing the content of `footnotes_assembled` on the page, + * consider adding the attribute `role="doc-endnotes"` to the `div` or + * `section` that will enclose the list of footnotes so they are + * reachable to accessibility tools the same way they would be with the + * default HTML output. + * @var null|string + */ + public $footnotes_assembled = null; + /** * Parser implementation */ @@ -133,6 +165,12 @@ class MarkdownExtra extends \Michelf\Markdown { */ protected $footnote_counter = 1; + /** + * Ref attribute for links + * @var array + */ + protected $ref_attr = array(); + /** * Setting up Extra-specific variables. */ @@ -146,6 +184,7 @@ class MarkdownExtra extends \Michelf\Markdown { $this->abbr_desciptions = array(); $this->abbr_word_re = ''; $this->footnote_counter = 1; + $this->footnotes_assembled = null; foreach ($this->predef_abbr as $abbr_word => $abbr_desc) { if ($this->abbr_word_re) @@ -166,6 +205,9 @@ class MarkdownExtra extends \Michelf\Markdown { $this->abbr_desciptions = array(); $this->abbr_word_re = ''; + if ( ! $this->omit_footnotes ) + $this->footnotes_assembled = null; + parent::teardown(); } @@ -202,7 +244,9 @@ class MarkdownExtra extends \Michelf\Markdown { * @return string */ protected function doExtraAttributes($tag_name, $attr, $defaultIdValue = null, $classes = array()) { - if (empty($attr) && !$defaultIdValue && empty($classes)) return ""; + if (empty($attr) && !$defaultIdValue && empty($classes)) { + return ""; + } // Split on components preg_match_all('/[#.a-z][-_:a-zA-Z0-9=]+/', $attr, $matches); @@ -212,9 +256,9 @@ class MarkdownExtra extends \Michelf\Markdown { $attributes = array(); $id = false; foreach ($elements as $element) { - if ($element{0} == '.') { + if ($element[0] === '.') { $classes[] = substr($element, 1); - } else if ($element{0} == '#') { + } else if ($element[0] === '#') { if ($id === false) $id = substr($element, 1); } else if (strpos($element, '=') > 0) { $parts = explode('=', $element, 2); @@ -222,7 +266,9 @@ class MarkdownExtra extends \Michelf\Markdown { } } - if (!$id) $id = $defaultIdValue; + if ($id === false || $id === '') { + $id = $defaultIdValue; + } // Compose attributes as string $attr_str = ""; @@ -486,7 +532,6 @@ class MarkdownExtra extends \Michelf\Markdown { $tag = $parts[1]; // Tag to handle. $text = $parts[2]; // Remaining text after current tag. - $tag_re = preg_quote($tag); // For use in a regular expression. // Check for: Fenced code block marker. // Note: need to recheck the whole tag to disambiguate backtick @@ -508,14 +553,14 @@ class MarkdownExtra extends \Michelf\Markdown { } } // Check for: Indented code block. - else if ($tag{0} == "\n" || $tag{0} == " ") { + else if ($tag[0] === "\n" || $tag[0] === " ") { // Indented code block: pass it unchanged, will be handled // later. $parsed .= $tag; } // Check for: Code span marker // Note: need to check this after backtick fenced code blocks - else if ($tag{0} == "`") { + else if ($tag[0] === "`") { // Find corresponding end marker. $tag_re = preg_quote($tag); if (preg_match('{^(?>.+?|\n(?!\n))*?(?clean_tags_re . ')\b}', $tag) || - $tag{1} == '!' || $tag{1} == '?') + $tag[1] === '!' || $tag[1] === '?') { // Need to parse tag and following text using the HTML parser. // (don't check for markdown attribute) @@ -564,8 +609,11 @@ class MarkdownExtra extends \Michelf\Markdown { preg_match('{^) // Comments and Processing Instructions. if (preg_match('{^auto_close_tags_re . ')\b}', $tag) || - $tag{1} == '!' || $tag{1} == '?') + $tag[1] === '!' || $tag[1] === '?') { // Just add the tag to the block as if it was text. $block_text .= $tag; @@ -683,8 +732,11 @@ class MarkdownExtra extends \Michelf\Markdown { // Increase/decrease nested tag count. Only do so if // the tag's name match base tag's. if (preg_match('{^mode = $attr_m[2] . $attr_m[3]; - $span_mode = $this->mode == 'span' || $this->mode != 'block' && - preg_match('{^<(?:' . $this->contain_span_tags_re . ')\b}', $tag); + $mode = $attr_m[2] . $attr_m[3]; + $span_mode = $mode === 'span' || ($mode !== 'block' && + preg_match('{^<(?:' . $this->contain_span_tags_re . ')\b}', $tag)); // Calculate indent before tag. if (preg_match('/(?:^|\n)( *?)(?! ).*?$/', $block_text, $matches)) { @@ -729,8 +781,11 @@ class MarkdownExtra extends \Michelf\Markdown { } // Append tag content to parsed text. - if (!$span_mode) $parsed .= "\n\n$block_text\n\n"; - else $parsed .= "$block_text"; + if (!$span_mode) { + $parsed .= "\n\n$block_text\n\n"; + } else { + $parsed .= (string) $block_text; + } // Start over with a new block. $block_text = ""; @@ -875,16 +930,15 @@ class MarkdownExtra extends \Michelf\Markdown { * @return string */ protected function _doAnchors_inline_callback($matches) { - $whole_match = $matches[1]; $link_text = $this->runSpanGamut($matches[2]); - $url = $matches[3] == '' ? $matches[4] : $matches[3]; + $url = $matches[3] === '' ? $matches[4] : $matches[3]; $title =& $matches[7]; $attr = $this->doExtraAttributes("a", $dummy =& $matches[8]); // if the URL was of the form it got caught by the HTML // tag parser and hashed. Need to reverse the process before using the URL. $unhashed = $this->unhash($url); - if ($unhashed != $url) + if ($unhashed !== $url) $url = preg_replace('/^<(.*)>$/', '\1', $unhashed); $url = $this->encodeURLAttribute($url); @@ -967,7 +1021,7 @@ class MarkdownExtra extends \Michelf\Markdown { $alt_text = $matches[2]; $link_id = strtolower($matches[3]); - if ($link_id == "") { + if ($link_id === "") { $link_id = strtolower($alt_text); // for shortcut links like ![this][]. } @@ -980,8 +1034,9 @@ class MarkdownExtra extends \Michelf\Markdown { $title = $this->encodeAttribute($title); $result .= " title=\"$title\""; } - if (isset($this->ref_attr[$link_id])) + if (isset($this->ref_attr[$link_id])) { $result .= $this->ref_attr[$link_id]; + } $result .= $this->empty_element_suffix; $result = $this->hashPart($result); } @@ -999,9 +1054,8 @@ class MarkdownExtra extends \Michelf\Markdown { * @return string */ protected function _doImages_inline_callback($matches) { - $whole_match = $matches[1]; $alt_text = $matches[2]; - $url = $matches[3] == '' ? $matches[4] : $matches[3]; + $url = $matches[3] === '' ? $matches[4] : $matches[3]; $title =& $matches[7]; $attr = $this->doExtraAttributes("img", $dummy =& $matches[8]); @@ -1067,11 +1121,11 @@ class MarkdownExtra extends \Michelf\Markdown { * @return string */ protected function _doHeaders_callback_setext($matches) { - if ($matches[3] == '-' && preg_match('{^- }', $matches[1])) { + if ($matches[3] === '-' && preg_match('{^- }', $matches[1])) { return $matches[0]; } - $level = $matches[3]{0} == '=' ? 1 : 2; + $level = $matches[3][0] === '=' ? 1 : 2; $defaultId = is_callable($this->header_id_func) ? call_user_func($this->header_id_func, $matches[1]) : null; @@ -1174,8 +1228,7 @@ class MarkdownExtra extends \Michelf\Markdown { * @param string $alignname * @return string */ - protected function _doTable_makeAlignAttr($alignname) - { + protected function _doTable_makeAlignAttr($alignname) { if (empty($this->table_align_class_tmpl)) { return " align=\"$alignname\""; } @@ -1223,8 +1276,9 @@ class MarkdownExtra extends \Michelf\Markdown { $text = "\n"; $text .= "\n"; $text .= "\n"; - foreach ($headers as $n => $header) + foreach ($headers as $n => $header) { $text .= " " . $this->runSpanGamut(trim($header)) . "\n"; + } $text .= "\n"; $text .= "\n"; @@ -1242,8 +1296,9 @@ class MarkdownExtra extends \Michelf\Markdown { $row_cells = array_pad($row_cells, $col_count, ''); $text .= "\n"; - foreach ($row_cells as $n => $cell) + foreach ($row_cells as $n => $cell) { $text .= " " . $this->runSpanGamut(trim($cell)) . "\n"; + } $text .= "\n"; } $text .= "\n"; @@ -1411,8 +1466,6 @@ class MarkdownExtra extends \Michelf\Markdown { */ protected function doFencedCodeBlocks($text) { - $less_than_tab = $this->tab_width; - $text = preg_replace_callback('{ (?:\n|\A) # 1: Opening marker @@ -1465,9 +1518,10 @@ class MarkdownExtra extends \Michelf\Markdown { array($this, '_doFencedCodeBlocks_newlines'), $codeblock); $classes = array(); - if ($classname != "") { - if ($classname{0} == '.') + if ($classname !== "") { + if ($classname[0] === '.') { $classname = substr($classname, 1); + } $classes[] = $this->code_class_prefix . $classname; } $attr_str = $this->doExtraAttributes($this->code_attr_on_pre ? "pre" : "code", $attrs, null, $classes); @@ -1608,65 +1662,95 @@ class MarkdownExtra extends \Michelf\Markdown { $text = preg_replace_callback('{F\x1Afn:(.*?)\x1A:}', array($this, '_appendFootnotes_callback'), $text); - if (!empty($this->footnotes_ordered)) { - $text .= "\n\n"; - $text .= "
\n"; - $text .= "empty_element_suffix . "\n"; - $text .= "
    \n\n"; - - $attr = ""; - if ($this->fn_backlink_class != "") { - $class = $this->fn_backlink_class; - $class = $this->encodeAttribute($class); - $attr .= " class=\"$class\""; - } - if ($this->fn_backlink_title != "") { - $title = $this->fn_backlink_title; - $title = $this->encodeAttribute($title); - $attr .= " title=\"$title\""; - $attr .= " aria-label=\"$title\""; + if ( ! empty( $this->footnotes_ordered ) ) { + $this->_doFootnotes(); + if ( ! $this->omit_footnotes ) { + $text .= "\n\n"; + $text .= "
    \n"; + $text .= "empty_element_suffix . "\n"; + $text .= $this->footnotes_assembled; + $text .= "
    "; } - $attr .= " role=\"doc-backlink\""; - $backlink_text = $this->fn_backlink_html; - $num = 0; - - while (!empty($this->footnotes_ordered)) { - $footnote = reset($this->footnotes_ordered); - $note_id = key($this->footnotes_ordered); - unset($this->footnotes_ordered[$note_id]); - $ref_count = $this->footnotes_ref_count[$note_id]; - unset($this->footnotes_ref_count[$note_id]); - unset($this->footnotes[$note_id]); - - $footnote .= "\n"; // Need to append newline before parsing. - $footnote = $this->runBlockGamut("$footnote\n"); - $footnote = preg_replace_callback('{F\x1Afn:(.*?)\x1A:}', - array($this, '_appendFootnotes_callback'), $footnote); - - $attr = str_replace("%%", ++$num, $attr); - $note_id = $this->encodeAttribute($note_id); - - // Prepare backlink, multiple backlinks if multiple references - $backlink = "$backlink_text"; - for ($ref_num = 2; $ref_num <= $ref_count; ++$ref_num) { - $backlink .= " $backlink_text"; + } + return $text; + } + + + /** + * Generates the HTML for footnotes. Called by appendFootnotes, even if + * footnotes are not being appended. + * @return void + */ + protected function _doFootnotes() { + $attr = array(); + if ($this->fn_backlink_class !== "") { + $class = $this->fn_backlink_class; + $class = $this->encodeAttribute($class); + $attr['class'] = " class=\"$class\""; + } + $attr['role'] = " role=\"doc-backlink\""; + $num = 0; + + $text = "
      \n\n"; + while (!empty($this->footnotes_ordered)) { + $footnote = reset($this->footnotes_ordered); + $note_id = key($this->footnotes_ordered); + unset($this->footnotes_ordered[$note_id]); + $ref_count = $this->footnotes_ref_count[$note_id]; + unset($this->footnotes_ref_count[$note_id]); + unset($this->footnotes[$note_id]); + + $footnote .= "\n"; // Need to append newline before parsing. + $footnote = $this->runBlockGamut("$footnote\n"); + $footnote = preg_replace_callback('{F\x1Afn:(.*?)\x1A:}', + array($this, '_appendFootnotes_callback'), $footnote); + + $num++; + $note_id = $this->encodeAttribute($note_id); + + // Prepare backlink, multiple backlinks if multiple references + // Do not create empty backlinks if the html is blank + $backlink = ""; + if (!empty($this->fn_backlink_html)) { + for ($ref_num = 1; $ref_num <= $ref_count; ++$ref_num) { + if (!empty($this->fn_backlink_title)) { + $attr['title'] = ' title="' . $this->encodeAttribute($this->fn_backlink_title) . '"'; + } + if (!empty($this->fn_backlink_label)) { + $attr['label'] = ' aria-label="' . $this->encodeAttribute($this->fn_backlink_label) . '"'; + } + $parsed_attr = $this->parseFootnotePlaceholders( + implode('', $attr), + $num, + $ref_num + ); + $backlink_text = $this->parseFootnotePlaceholders( + $this->fn_backlink_html, + $num, + $ref_num + ); + $ref_count_mark = $ref_num > 1 ? $ref_num : ''; + $backlink .= " $backlink_text"; } - // Add backlink to last paragraph; create new paragraph if needed. + $backlink = trim($backlink); + } + + // Add backlink to last paragraph; create new paragraph if needed. + if (!empty($backlink)) { if (preg_match('{

      $}', $footnote)) { $footnote = substr($footnote, 0, -4) . " $backlink

      "; } else { $footnote .= "\n\n

      $backlink

      "; } - - $text .= "
    1. \n"; - $text .= $footnote . "\n"; - $text .= "
    2. \n\n"; } - $text .= "
    \n"; - $text .= "
"; + $text .= "
  • \n"; + $text .= $footnote . "\n"; + $text .= "
  • \n\n"; } - return $text; + $text .= "\n"; + + $this->footnotes_assembled = $text; } /** @@ -1693,12 +1777,12 @@ class MarkdownExtra extends \Michelf\Markdown { } $attr = ""; - if ($this->fn_link_class != "") { + if ($this->fn_link_class !== "") { $class = $this->fn_link_class; $class = $this->encodeAttribute($class); $attr .= " class=\"$class\""; } - if ($this->fn_link_title != "") { + if ($this->fn_link_title !== "") { $title = $this->fn_link_title; $title = $this->encodeAttribute($title); $attr .= " title=\"$title\""; @@ -1717,6 +1801,23 @@ class MarkdownExtra extends \Michelf\Markdown { return "[^" . $matches[1] . "]"; } + /** + * Build footnote label by evaluating any placeholders. + * - ^^ footnote number + * - %% footnote reference number (Nth reference to footnote number) + * @param string $label + * @param int $footnote_number + * @param int $reference_number + * @return string + */ + protected function parseFootnotePlaceholders($label, $footnote_number, $reference_number) { + return str_replace( + array('^^', '%%'), + array($footnote_number, $reference_number), + $label + ); + } + /** * Abbreviations - strips abbreviations from text, stores titles in hash @@ -1783,12 +1884,10 @@ class MarkdownExtra extends \Michelf\Markdown { $desc = $this->abbr_desciptions[$abbr]; if (empty($desc)) { return $this->hashPart("$abbr"); - } else { - $desc = $this->encodeAttribute($desc); - return $this->hashPart("$abbr"); } - } else { - return $matches[0]; + $desc = $this->encodeAttribute($desc); + return $this->hashPart("$abbr"); } + return $matches[0]; } } diff --git a/vendor/michelf/php-markdown/Michelf/MarkdownInterface.php b/vendor/michelf/php-markdown/Michelf/MarkdownInterface.php index 7fc0da06e..006452445 100644 --- a/vendor/michelf/php-markdown/Michelf/MarkdownInterface.php +++ b/vendor/michelf/php-markdown/Michelf/MarkdownInterface.php @@ -4,7 +4,7 @@ * * @package php-markdown * @author Michel Fortin - * @copyright 2004-2018 Michel Fortin + * @copyright 2004-2019 Michel Fortin * @copyright (Original Markdown) 2004-2006 John Gruber */ diff --git a/vendor/michelf/php-markdown/Readme.md b/vendor/michelf/php-markdown/Readme.md index c05cd93d4..e1eb30660 100644 --- a/vendor/michelf/php-markdown/Readme.md +++ b/vendor/michelf/php-markdown/Readme.md @@ -1,7 +1,7 @@ PHP Markdown ============ -PHP Markdown Lib 1.8.0 - 14 Jan 2018 +PHP Markdown Lib 1.9.0 - 1 Dec 2019 by Michel Fortin @@ -163,26 +163,54 @@ potential side effects, and future extensibility -- before deciding on acceptance or rejection. If you make a pull request that includes changes to the parser please add -tests for what is being changed to [MDTest][] and make a pull request there -too. +tests for what is being changed to the `test/` directory. This can be as +simple as adding a `.text` (input) file with a corresponding `.xhtml` +(output) file to proper category under `./test/resources/`. - [MDTest]: https://github.com/michelf/mdtest/ +Traditionally tests were in a separate repository, [MDTest](https://github.com/michelf/mdtest) +but they are now located here, alongside the source code. Donations --------- If you wish to make a donation that will help me devote more time to -PHP Markdown, please visit [michelf.ca/donate] or send Bitcoin to -[1HiuX34czvVPPdhXbUAsAu7pZcesniDCGH]. +PHP Markdown, please visit [michelf.ca/donate]. [michelf.ca/donate]: https://michelf.ca/donate/#!Thanks%20for%20PHP%20Markdown - [1HiuX34czvVPPdhXbUAsAu7pZcesniDCGH]: bitcoin:1HiuX34czvVPPdhXbUAsAu7pZcesniDCGH Version History --------------- +PHP Markdown Lib 1.9.0 (1 Dec 2019) + +* Added `fn_backlink_label` configuration variable to put some text in the + `aria-label` attribute. + (Thanks to Sunny Walker for the implementation.) + +* Occurances of "`^^`" in `fn_backlink_html`, `fn_backlink_class`, + `fn_backlink_title`, and `fn_backlink_label` will be replaced by the + corresponding footnote number in the HTML output. Occurances of "`%%`" will be + replaced by a number for the reference (footnotes can have multiple references). + (Thanks to Sunny Walker for the implementation.) + +* Added configuration variable `omit_footnotes`. When `true` footnotes are not + appended at the end of the generated HTML and the `footnotes_assembled` + variable will contain the HTML for the footnote list, allowing footnotes to be + moved somewhere else on the page. + (Thanks to James K. for the implementation.) + + Note: when placing the content of `footnotes_assembled` on the page, consider + adding the attribute `role="doc-endnotes"` to the `
    ` or `
    ` that will + enclose the list of footnotes so they are reachable to accessibility tools the + same way they would be with the default HTML output. + +* Fixed deprecation warnings from PHP about usage of curly braces to access + characters in text strings. + (Thanks to Remi Collet and Frans-Willem Post.) + + PHP Markdown Lib 1.8.0 (14 Jan 2018) * Autoloading with Composer now uses PSR-4. @@ -371,7 +399,7 @@ Copyright and License --------------------- PHP Markdown Lib -Copyright (c) 2004-2016 Michel Fortin +Copyright (c) 2004-2019 Michel Fortin All rights reserved. diff --git a/vendor/michelf/php-markdown/Readme.php b/vendor/michelf/php-markdown/Readme.php index e473d7336..726bbe3d3 100644 --- a/vendor/michelf/php-markdown/Readme.php +++ b/vendor/michelf/php-markdown/Readme.php @@ -9,7 +9,7 @@ spl_autoload_register(function($class){ require str_replace('\\', DIRECTORY_SEPARATOR, ltrim($class, '\\')).'.php'; }); // If using Composer, use this instead: -//require 'vendor/autoloader.php'; +//require 'vendor/autoload.php'; // Get Markdown class use Michelf\Markdown; @@ -21,13 +21,13 @@ $html = Markdown::defaultTransform($text); ?> - - PHP Markdown Lib - Readme - - + + PHP Markdown Lib - Readme + + - + diff --git a/vendor/michelf/php-markdown/composer.json b/vendor/michelf/php-markdown/composer.json index 6b1993d65..093507554 100644 --- a/vendor/michelf/php-markdown/composer.json +++ b/vendor/michelf/php-markdown/composer.json @@ -22,5 +22,8 @@ }, "autoload": { "psr-4": { "Michelf\\": "Michelf/" } + }, + "require-dev": { + "phpunit/phpunit": ">=4.3 <5.8" } } diff --git a/vendor/michelf/php-markdown/phpunit.xml.dist b/vendor/michelf/php-markdown/phpunit.xml.dist new file mode 100644 index 000000000..8f2dab54d --- /dev/null +++ b/vendor/michelf/php-markdown/phpunit.xml.dist @@ -0,0 +1,24 @@ + + + + + ./test/unit/ + + + ./test/integration/ + + + + + + Michelf + + + diff --git a/vendor/michelf/php-markdown/test/bootstrap.php b/vendor/michelf/php-markdown/test/bootstrap.php new file mode 100644 index 000000000..a7b3507d0 --- /dev/null +++ b/vendor/michelf/php-markdown/test/bootstrap.php @@ -0,0 +1,6 @@ +loadXML('' . + "" . + "$t_result"); + + $document2 = new DOMDocument(); + $doc_output = $document2->loadXML('' . + "" . + "$t_output"); + + if ($doc_result) { + static::normalizeElementContent($document->documentElement, false); + $n_result = $document->saveXML(); + } else { + $n_result = '--- Expected Result: XML Parse Error ---'; + } + if ($doc_output) { + static::normalizeElementContent($document2->documentElement, false); + $n_output = $document2->saveXML(); + } else { + $n_output = '--- Output: XML Parse Error ---'; + } + } else { + + // '@' suppressors used because some tests have invalid HTML (multiple elements with the same id attribute) + // Perhaps isolate to a separate test and remove this? + + $document = new DOMDocument(); + $doc_result = @$document->loadHTML($t_result); + + $document2 = new DOMDocument(); + $doc_output = @$document2->loadHTML($t_output); + + if ($doc_result) { + static::normalizeElementContent($document->documentElement, false); + $n_result = $document->saveHTML(); + } else { + $n_result = '--- Expected Result: HTML Parse Error ---'; + } + + if ($doc_output) { + static::normalizeElementContent($document2->documentElement, false); + $n_output = $document2->saveHTML(); + } else { + $n_output = '--- Output: HTML Parse Error ---'; + } + } + + $n_result = preg_replace('{^.*?|.*?$}is', '', $n_result); + $n_output = preg_replace('{^.*?|.*?$}is', '', $n_output); + + $c_result = $n_result; + $c_output = $n_output; + + $c_result = trim($c_result) . "\n"; + $c_output = trim($c_output) . "\n"; + + // This will throw a test exception if the strings don't exactly match + TestCase::assertSame($c_result, $c_output, $message); + } + + /** + * @param DOMElement $element Modifies this element by reference + * @param bool $whitespace_preserve Preserve Whitespace + * @return void + */ + protected static function normalizeElementContent($element, $whitespace_preserve) { + # + # Normalize content of HTML DOM $element. The $whitespace_preserve + # argument indicates that whitespace is significant and shouldn't be + # normalized; it should be used for the content of certain elements like + #
     or