Skip to content

Commit 8e7f4e3

Browse files
authored
Merge pull request #1101 from phpDocumentor/fix/auto-detect-inline-links
[BUGFIX] add support for auto detected inline links
2 parents 77a7313 + 524d12e commit 8e7f4e3

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

packages/guides-markdown/src/Markdown/MarkupLanguageParser.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
namespace phpDocumentor\Guides\Markdown;
1515

1616
use League\CommonMark\Environment\Environment as CommonMarkEnvironment;
17+
use League\CommonMark\Extension\Autolink\AutolinkExtension;
1718
use League\CommonMark\Extension\CommonMark\CommonMarkCoreExtension;
1819
use League\CommonMark\Node\Block\Document;
1920
use League\CommonMark\Node\NodeWalker;
@@ -45,6 +46,7 @@ public function __construct(
4546
) {
4647
$cmEnvironment = new CommonMarkEnvironment(['html_input' => 'strip']);
4748
$cmEnvironment->addExtension(new CommonMarkCoreExtension());
49+
$cmEnvironment->addExtension(new AutolinkExtension());
4850
$this->markdownParser = new MarkdownParser($cmEnvironment);
4951
}
5052

tests/Integration/tests/markdown/url-embedded-md/expected/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ <h1>Sample Markdown Document</h1>
55
<p>See <a href="https://www.example.com">https://www.example.com</a> for additional information.</p>
66

77

8-
<p>See also <a href="https://www.example.com/more">https://www.example.com/more</a>.</p>
8+
<p>See also <a href="https://www.example.com/more">https://www.example.com/more</a>.</p>
99

1010
</div>
1111
<!-- content end -->

tests/Integration/tests/markdown/url-embedded-md/input/skip

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)