aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/league/html-to-markdown/src/Converter/TextConverter.php
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/league/html-to-markdown/src/Converter/TextConverter.php')
-rw-r--r--vendor/league/html-to-markdown/src/Converter/TextConverter.php4
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);