projects
/
blerg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
e0dd0ca
)
Recognize links inside parentheses/brackets
author
Chip Black
<bytex64@bytex64.net>
Thu, 13 Sep 2012 06:01:12 +0000
(23:01 -0700)
committer
Chip Black
<bytex64@bytex64.net>
Thu, 13 Sep 2012 06:01:12 +0000
(23:01 -0700)
www/js/blerg.js
patch
|
blob
|
history
diff --git
a/www/js/blerg.js
b/www/js/blerg.js
index
2ef48d9
..
8cb5bab
100644
(file)
--- a/
www/js/blerg.js
+++ b/
www/js/blerg.js
@@
-401,7
+401,7
@@
function mangleRecord(record, template) {
l = l.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>');
// Turn HTTP URLs into links
- l = l.replace(/(\s|^)(https?:\/\/[a-zA-Z0-9.-]*[a-zA-Z0-9](\/([^\s"]*[^.!,;?()\s])?)?)/g, '$1<a href="$2">$2</a>');
+ l = l.replace(/(\s
[()\[\]{}]?
|^)(https?:\/\/[a-zA-Z0-9.-]*[a-zA-Z0-9](\/([^\s"]*[^.!,;?()\s])?)?)/g, '$1<a href="$2">$2</a>');
// Turn markdown links into links
var re;