aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/league/html-to-markdown/src/Converter/HardBreakConverter.php
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2018-08-28 12:00:23 +0200
committerMario Vavti <mario@mariovavti.com>2018-08-28 12:00:23 +0200
commitc0c827d3ad2c8364d35fff5546ab40ea76bbbbd9 (patch)
tree34bb14bb6046ce98bd6ad759b9c57624b2be7d34 /vendor/league/html-to-markdown/src/Converter/HardBreakConverter.php
parent6a2bbed73dfb34975c4525c34c03f20c6945dedc (diff)
downloadvolse-hubzilla-c0c827d3ad2c8364d35fff5546ab40ea76bbbbd9.tar.gz
volse-hubzilla-c0c827d3ad2c8364d35fff5546ab40ea76bbbbd9.tar.bz2
volse-hubzilla-c0c827d3ad2c8364d35fff5546ab40ea76bbbbd9.zip
update composer libs and add ramsey/uuid
Diffstat (limited to 'vendor/league/html-to-markdown/src/Converter/HardBreakConverter.php')
-rw-r--r--vendor/league/html-to-markdown/src/Converter/HardBreakConverter.php14
1 files changed, 13 insertions, 1 deletions
diff --git a/vendor/league/html-to-markdown/src/Converter/HardBreakConverter.php b/vendor/league/html-to-markdown/src/Converter/HardBreakConverter.php
index 37cd44e73..d079d9127 100644
--- a/vendor/league/html-to-markdown/src/Converter/HardBreakConverter.php
+++ b/vendor/league/html-to-markdown/src/Converter/HardBreakConverter.php
@@ -28,7 +28,19 @@ class HardBreakConverter implements ConverterInterface, ConfigurationAwareInterf
*/
public function convert(ElementInterface $element)
{
- return $this->config->getOption('hard_break') ? "\n" : " \n";
+ $return = $this->config->getOption('hard_break') ? "\n" : " \n";
+
+ $next = $element->getNext();
+ if ($next) {
+ $next_value = $next->getValue();
+ if ($next_value) {
+ if (in_array(substr($next_value, 0, 2), array('- ', '* ', '+ '))) {
+ $return .= '\\';
+ }
+ }
+ }
+
+ return $return;
}
/**