From 88a68f96da303893d911f09c25088d4f8288b5fb Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Sat, 22 Aug 2020 19:56:28 +0200 Subject: composer update html-to-markdown --- vendor/league/html-to-markdown/README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'vendor/league/html-to-markdown/README.md') 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 `` 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 = '

https://thephpleague.com

'; + +$converter->getConfig()->setOption('use_autolinks', true); +$markdown = $converter->convert($html); // $markdown now contains "" + +$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. -- cgit v1.2.3