diff options
author | zotlabs <mike@macgirvin.com> | 2018-10-30 18:11:49 -0700 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2018-10-30 18:11:49 -0700 |
commit | 70c55da1df69d90dcbeb5a78c994b23a8456bfc9 (patch) | |
tree | 86d39069b02ecabe4ed091514e5076a98abda43a /vendor/league/html-to-markdown/src/Converter/TextConverter.php | |
parent | 623aa7ea48149ca7c2bc556931f25befdf49e58a (diff) | |
parent | f9ab7647dd660adb37464614616cb8484c500de4 (diff) | |
download | volse-hubzilla-70c55da1df69d90dcbeb5a78c994b23a8456bfc9.tar.gz volse-hubzilla-70c55da1df69d90dcbeb5a78c994b23a8456bfc9.tar.bz2 volse-hubzilla-70c55da1df69d90dcbeb5a78c994b23a8456bfc9.zip |
Merge branch 'dev' of https://framagit.org/hubzilla/core into xdev_merge
Diffstat (limited to 'vendor/league/html-to-markdown/src/Converter/TextConverter.php')
-rw-r--r-- | vendor/league/html-to-markdown/src/Converter/TextConverter.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/vendor/league/html-to-markdown/src/Converter/TextConverter.php b/vendor/league/html-to-markdown/src/Converter/TextConverter.php index d6d91e16f..fcd466094 100644 --- a/vendor/league/html-to-markdown/src/Converter/TextConverter.php +++ b/vendor/league/html-to-markdown/src/Converter/TextConverter.php @@ -22,7 +22,9 @@ class TextConverter implements ConverterInterface $markdown = preg_replace('~\s+~u', ' ', $markdown); // Escape the following characters: '*', '_', '[', ']' and '\' - $markdown = preg_replace('~([*_\\[\\]\\\\])~u', '\\\\$1', $markdown); + if ($element->getParent() && $element->getParent()->getTagName() !== 'div') { + $markdown = preg_replace('~([*_\\[\\]\\\\])~u', '\\\\$1', $markdown); + } $markdown = preg_replace('~^#~u', '\\\\#', $markdown); |