aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/league/html-to-markdown/README.md
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2020-11-05 08:46:42 +0000
committerMario <mario@mariovavti.com>2020-11-05 08:46:42 +0000
commitbafbf0416462c6f18c3fb6c8c06a063c8d6fdae6 (patch)
tree8929845be585b09d0f420621281c5531e1efad3e /vendor/league/html-to-markdown/README.md
parent6f93d9848c43019d43ea76c27d42d657ba031cd7 (diff)
parentfdefa101d84dc2a9424eaedbdb003a4c30ec5d01 (diff)
downloadvolse-hubzilla-5.0.tar.gz
volse-hubzilla-5.0.tar.bz2
volse-hubzilla-5.0.zip
Merge branch '5.0RC'5.0
Diffstat (limited to 'vendor/league/html-to-markdown/README.md')
-rw-r--r--vendor/league/html-to-markdown/README.md15
1 files changed, 15 insertions, 0 deletions
diff --git a/vendor/league/html-to-markdown/README.md b/vendor/league/html-to-markdown/README.md
index c7ae2dcab..c1ac805ab 100644
--- a/vendor/league/html-to-markdown/README.md
+++ b/vendor/league/html-to-markdown/README.md
@@ -141,6 +141,21 @@ $converter->getConfig()->setOption('hard_break', false); // default
$markdown = $converter->convert($html); // $markdown now contains "test \nline break"
```
+### Autolinking options
+
+By default, `a` tags are converted to the easiest possible link syntax, i.e. if no text or title is available, then the `<url>` syntax will be used rather than the full `[url](url)` syntax. Set `use_autolinks` to `false` to change this behavior to always use the full link syntax.
+
+```php
+$converter = new HtmlConverter();
+$html = '<p><a href="https://thephpleague.com">https://thephpleague.com</a></p>';
+
+$converter->getConfig()->setOption('use_autolinks', true);
+$markdown = $converter->convert($html); // $markdown now contains "<https://thephpleague.com>"
+
+$converter->getConfig()->setOption('use_autolinks', false); // default
+$markdown = $converter->convert($html); // $markdown now contains "[https://google.com](https://google.com)"
+```
+
### Passing custom Environment object
You can pass current `Environment` object to customize i.e. which converters should be used.