Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Slightly improve textile.js link handling

  • Loading branch information...
commit 4df63fb1c14ae360b2a10a3cd43ca6a7ace153d4 1 parent 1093a50
@namelessjon authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  helpers/textile.js
View
2  helpers/textile.js
@@ -98,7 +98,7 @@ function prep(m){
m=m.replace(/\"([^\"]+)\":((http|https|mailto):\S+)/g,'<a href="$2">$1<\/a>');
m = make_image(m,/!([^!\s]+)!:(\S+)/);
m = make_image(m,/!([^!\s]+)!/);
- m=m.replace(/"([^\"]+)":(\S+)/g,function($0,$1,$2){return tag("a",qat('href',aliases[$2]),$1)});
+ m=m.replace(/"([^\"]+)":(\S+)/g,function($0,$1,$2){return tag("a",qat('href',aliases[$2] || ("http://" + $2)),$1)});
m=m.replace(/(=)?"([^\"]+)"/g,function($0,$1,$2){return ($1)?$0:"&#8220;"+$2+"&#8221;"});
return m;
}
Please sign in to comment.
Something went wrong with that request. Please try again.