diff options
author | Mario Vavti <mario@mariovavti.com> | 2019-09-23 09:16:28 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2019-09-23 12:22:08 +0200 |
commit | efec0af394df5ed4674d9cba8945be17de475388 (patch) | |
tree | 1e85d8756ae041fd87ce29ee9ff87d4f143f8af0 /vendor/league/html-to-markdown/src | |
parent | 9b90114d035ce4c10ee11cd2fbffe1f5ab95af17 (diff) | |
download | volse-hubzilla-efec0af394df5ed4674d9cba8945be17de475388.tar.gz volse-hubzilla-efec0af394df5ed4674d9cba8945be17de475388.tar.bz2 volse-hubzilla-efec0af394df5ed4674d9cba8945be17de475388.zip |
composer update vendor/league/html-to-markdown/.github/
(cherry picked from commit e4336578388b3e59ba8130123649ccdc9b8487d0)
Diffstat (limited to 'vendor/league/html-to-markdown/src')
-rw-r--r-- | vendor/league/html-to-markdown/src/Converter/HeaderConverter.php | 2 | ||||
-rw-r--r-- | vendor/league/html-to-markdown/src/Converter/LinkConverter.php | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/vendor/league/html-to-markdown/src/Converter/HeaderConverter.php b/vendor/league/html-to-markdown/src/Converter/HeaderConverter.php index 05d4fe81e..353833263 100644 --- a/vendor/league/html-to-markdown/src/Converter/HeaderConverter.php +++ b/vendor/league/html-to-markdown/src/Converter/HeaderConverter.php @@ -35,7 +35,7 @@ class HeaderConverter implements ConverterInterface, ConfigurationAwareInterface $style = $this->config->getOption('header_style', self::STYLE_SETEXT); if (strlen($element->getValue()) === 0) { - return ''; + return "\n"; } if (($level === 1 || $level === 2) && !$element->isDescendantOf('blockquote') && $style === self::STYLE_SETEXT) { diff --git a/vendor/league/html-to-markdown/src/Converter/LinkConverter.php b/vendor/league/html-to-markdown/src/Converter/LinkConverter.php index c82b70e97..81c18b65f 100644 --- a/vendor/league/html-to-markdown/src/Converter/LinkConverter.php +++ b/vendor/league/html-to-markdown/src/Converter/LinkConverter.php @@ -24,6 +24,9 @@ class LinkConverter implements ConverterInterface } elseif ($href === 'mailto:' . $text && $this->isValidEmail($text)) { $markdown = '<' . $text . '>'; } else { + if (stristr($href, ' ')) { + $href = '<'.$href.'>'; + } $markdown = '[' . $text . '](' . $href . ')'; } |