diff options
Diffstat (limited to 'vendor/league/html-to-markdown/src/Converter')
-rw-r--r-- | vendor/league/html-to-markdown/src/Converter/DefaultConverter.php | 8 | ||||
-rw-r--r-- | vendor/league/html-to-markdown/src/Converter/HardBreakConverter.php | 5 |
2 files changed, 11 insertions, 2 deletions
diff --git a/vendor/league/html-to-markdown/src/Converter/DefaultConverter.php b/vendor/league/html-to-markdown/src/Converter/DefaultConverter.php index 964a71093..8de0af210 100644 --- a/vendor/league/html-to-markdown/src/Converter/DefaultConverter.php +++ b/vendor/league/html-to-markdown/src/Converter/DefaultConverter.php @@ -37,7 +37,13 @@ class DefaultConverter implements ConverterInterface, ConfigurationAwareInterfac return $element->getValue(); } - return html_entity_decode($element->getChildrenAsString()); + $markdown = html_entity_decode($element->getChildrenAsString()); + + if ($element->getTagName() === 'table') { + $markdown .= "\n\n"; + } + + return $markdown; } /** diff --git a/vendor/league/html-to-markdown/src/Converter/HardBreakConverter.php b/vendor/league/html-to-markdown/src/Converter/HardBreakConverter.php index d079d9127..1be10bd63 100644 --- a/vendor/league/html-to-markdown/src/Converter/HardBreakConverter.php +++ b/vendor/league/html-to-markdown/src/Converter/HardBreakConverter.php @@ -35,7 +35,10 @@ class HardBreakConverter implements ConverterInterface, ConfigurationAwareInterf $next_value = $next->getValue(); if ($next_value) { if (in_array(substr($next_value, 0, 2), array('- ', '* ', '+ '))) { - $return .= '\\'; + $parent = $element->getParent(); + if ($parent && $parent->getTagName() == 'li') { + $return .= '\\'; + } } } } |