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

Commit

Permalink
Fix URL autolinking (fixes #10)
Browse files Browse the repository at this point in the history
  • Loading branch information
colinodell committed Mar 28, 2019
1 parent 030700d commit 66ba8a9
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased][unreleased]

## [0.2.1] - 2019-03-28

### Changed

- Increased the minimum `league/commonmark` version due to a now-fixed bug with `Text` collapsing (#10)

## [0.2.0] - 2019-03-16

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

Initial release!

[unreleased]: https://github.com/thephpleague/commonmark-ext-autolink/compare/v0.2.0...HEAD
[unreleased]: https://github.com/thephpleague/commonmark-ext-autolink/compare/v0.2.1...HEAD
[0.2.1]: https://github.com/thephpleague/commonmark-ext-autolink/compare/v0.2.0...v0.2.1
[0.2.0]: https://github.com/thephpleague/commonmark-ext-autolink/compare/v0.1.0...v0.2.0
[0.1.0]: https://github.com/thephpleague/commonmark-ext-autolink/commits/v0.1.0
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
],
"require": {
"php" : "^5.6||^7.0",
"league/commonmark": "^0.18.2"
"league/commonmark": "^0.18.5"
},
"require-dev": {
"phpunit/phpunit": "^5.7.27"
Expand Down
3 changes: 3 additions & 0 deletions tests/UrlAutolinkProcessorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,5 +69,8 @@ public function dataProviderForAutolinkTests()

// Test that < immediately terminates an autolink
yield ['www.commonmark.org/he<lp', '<p><a href="http://www.commonmark.org/he">www.commonmark.org/he</a>&lt;lp</p>'];

// Regression: two links with one underscore each
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>"];
}
}

0 comments on commit 66ba8a9

Please sign in to comment.