Skip to content
This repository was archived by the owner on Jul 24, 2025. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "markdown-it-flowdock",
"version": "0.3.7",
"version": "0.3.8",
"description": "Flowdock hashtag and mention parser for markdown-it",
"author": "Ville Lautanala <lautis@gmail.com>",
"keywords": [
Expand Down
2 changes: 1 addition & 1 deletion src/url.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function fixUrlsEndingInAParen(canidate) {
}

function replaceUrlTextWithAutoLinkUrl(text) {
const urlMatcher = /([a-z-_.:]+:\/\/\S+[^)\W]-?\/?)/ig;
const urlMatcher = /([a-z-_.:]+:\/\/\S+[^)\W]-?\/?)/igu;
const firstPass = text.replace(urlMatcher, "<$1>");

return fixUrlsEndingInAParen(firstPass)
Expand Down
15 changes: 15 additions & 0 deletions test/fixtures/url/default.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,21 @@ http://flowdock.com
<p><a href="http://flowdock.com">http://flowdock.com</a></p>
.

works with simple urls
.
http://flowdock.com/s
.
<p><a href="http://flowdock.com/s">http://flowdock.com/s</a></p>
.


works with simple urls
.
http://flowdock.com/sssss
.
<p><a href="http://flowdock.com/sssss">http://flowdock.com/sssss</a></p>
.

works with text before the url
.
baz http://flowdock.com
Expand Down