Skip to content
This repository was archived by the owner on Apr 4, 2020. It is now read-only.

Commit 66ba8a9

Browse files
committed
Fix URL autolinking (fixes #10)
1 parent 030700d commit 66ba8a9

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

CHANGELOG.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased][unreleased]
99

10+
## [0.2.1] - 2019-03-28
11+
12+
### Changed
13+
14+
- Increased the minimum `league/commonmark` version due to a now-fixed bug with `Text` collapsing (#10)
15+
1016
## [0.2.0] - 2019-03-16
1117

1218
This release brings the email and URL autolink processors into alignment with the official GFM spec.
@@ -29,6 +35,7 @@ This release brings the email and URL autolink processors into alignment with th
2935

3036
Initial release!
3137

32-
[unreleased]: https://github.com/thephpleague/commonmark-ext-autolink/compare/v0.2.0...HEAD
38+
[unreleased]: https://github.com/thephpleague/commonmark-ext-autolink/compare/v0.2.1...HEAD
39+
[0.2.1]: https://github.com/thephpleague/commonmark-ext-autolink/compare/v0.2.0...v0.2.1
3340
[0.2.0]: https://github.com/thephpleague/commonmark-ext-autolink/compare/v0.1.0...v0.2.0
3441
[0.1.0]: https://github.com/thephpleague/commonmark-ext-autolink/commits/v0.1.0

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
],
1616
"require": {
1717
"php" : "^5.6||^7.0",
18-
"league/commonmark": "^0.18.2"
18+
"league/commonmark": "^0.18.5"
1919
},
2020
"require-dev": {
2121
"phpunit/phpunit": "^5.7.27"

tests/UrlAutolinkProcessorTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,5 +69,8 @@ public function dataProviderForAutolinkTests()
6969

7070
// Test that < immediately terminates an autolink
7171
yield ['www.commonmark.org/he<lp', '<p><a href="http://www.commonmark.org/he">www.commonmark.org/he</a>&lt;lp</p>'];
72+
73+
// Regression: two links with one underscore each
74+
yield ["https://eventum.example.net/history.php?iss_id=107092\nhttps://gitlab.example.net/group/project/merge_requests/39#note_150630", "<p><a href=\"https://eventum.example.net/history.php?iss_id=107092\">https://eventum.example.net/history.php?iss_id=107092</a>\n<a href=\"https://gitlab.example.net/group/project/merge_requests/39#note_150630\">https://gitlab.example.net/group/project/merge_requests/39#note_150630</a></p>"];
7275
}
7376
}

0 commit comments

Comments
 (0)