You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 4, 2020. It is now read-only.
Copy file name to clipboardExpand all lines: CHANGELOG.md
+8-1Lines changed: 8 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
8
8
## [Unreleased][unreleased]
9
9
10
+
## [1.1.0] - 2020-04-01
11
+
12
+
### Deprecated
13
+
14
+
**This extension has been deprecated**. All of its functionality now exists in league/commonmark 1.3+ under the `League\CommonMark\Extension\Autolink` namespace.
15
+
10
16
## [1.0.1] - 2020-01-13
11
17
12
18
### Fixed
@@ -75,7 +81,8 @@ This release brings the email and URL autolink processors into alignment with th
**This extension has been deprecated**. All of its functionality now exists in [`league/commonmark`][link-league-commonmark] 1.3+ under the `League\CommonMark\Extension\Autolink` namespace, so you should upgrade to that version and use that bundled extension instead of this one.
13
+
14
+
## Overview
15
+
10
16
This extension adds [GFM-style autolinking][link-gfm-spec-autolinking] to the [`league/commonmark` Markdown parser for PHP][link-league-commonmark]. It automatically link URLs and email addresses even when the CommonMark `<...>` autolink syntax is not used.
11
17
12
18
It also provides a parser to autolink `@mentions` to Twitter, Github, or any custom service you wish, though this is disabled by default.
* @deprecated The league/commonmark-ext-autolink extension is now deprecated. All functionality has been moved into league/commonmark 1.3+, so use that instead.
@trigger_error(sprintf('league/commonmark-ext-autolink is deprecated; use %s from league/commonmark 1.3+ instead', CoreExtension::class), E_USER_DEPRECATED);
* @deprecated The league/commonmark-ext-autolink extension is now deprecated. All functionality has been moved into league/commonmark 1.3+, so use that instead.
@trigger_error(sprintf('league/commonmark-ext-autolink is deprecated; use %s from league/commonmark 1.3+ instead', CoreProcessor::class), E_USER_DEPRECATED);
29
+
$this->coreProcessor = newCoreProcessor();
30
+
}
31
+
22
32
/**
23
33
* @param DocumentParsedEvent $e
24
34
*
25
35
* @return void
26
36
*/
27
37
publicfunction__invoke(DocumentParsedEvent$e)
28
38
{
29
-
$walker = $e->getDocument()->walker();
30
-
31
-
while ($event = $walker->next()) {
32
-
$node = $event->getNode();
33
-
if ($nodeinstanceof Text && !($node->parent() instanceof Link)) {
* @deprecated The league/commonmark-ext-autolink extension is now deprecated. All functionality has been moved into league/commonmark 1.3+, so use that instead.
@trigger_error(sprintf('league/commonmark-ext-autolink is deprecated; use %s from league/commonmark 1.3+ instead', CoreParser::class), E_USER_DEPRECATED);
@trigger_error(sprintf('league/commonmark-ext-autolink is deprecated; use %s from league/commonmark 1.3+ instead', CoreParser::class), E_USER_DEPRECATED);
54
+
55
+
return CoreParser::createTwitterHandleParser();
83
56
}
84
57
85
58
publicstaticfunctioncreateGithubHandleParser()
86
59
{
87
-
// RegEx adapted from https://github.com/shinnn/github-username-regex/blob/master/index.js
@trigger_error(sprintf('league/commonmark-ext-autolink is deprecated; use %s from league/commonmark 1.3+ instead', CoreParser::class), E_USER_DEPRECATED);
* @deprecated The league/commonmark-ext-autolink extension is now deprecated. All functionality has been moved into league/commonmark 1.3+, so use that instead.
19
+
*/
18
20
finalclass UrlAutolinkProcessor
19
21
{
20
22
// RegEx adapted from https://github.com/symfony/symfony/blob/4.2/src/Symfony/Component/Validator/Constraints/UrlValidator.php
@@ -41,11 +43,12 @@ final class UrlAutolinkProcessor
41
43
(?:\# (?:[\pL\pN\-._\~!$&\'()*+,;=:@/?]|%%[0-9A-Fa-f]{2})* )? # a fragment (optional)
@trigger_error(sprintf('league/commonmark-ext-autolink is deprecated; use %s from league/commonmark 1.3+ instead', CoreProcessor::class), E_USER_DEPRECATED);
0 commit comments