aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/league/html-to-markdown/README.md
diff options
context:
space:
mode:
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.