mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-03-23 03:46:55 +00:00
Adjusted link class detection
The problem is that it's sometimes useful to use URLs as the title of tiddlers, making it hard to distinguish URLs from tiddler titles...
This commit is contained in:
parent
b92183a3a7
commit
bd617b2483
@ -185,10 +185,10 @@ WikiStore.prototype.getFormattedTiddlerField = function(title,field,format,templ
|
||||
WikiStore.prototype.classesForLink = function(target) {
|
||||
var className = "",
|
||||
externalRegExp = /(?:file|http|https|mailto|ftp|irc|news|data):[^\s'"]+(?:\/|\b)/i;
|
||||
if(externalRegExp.test(target)) {
|
||||
className = "linkExternal";
|
||||
} else if (this.tiddlerExists(target)) {
|
||||
if (this.tiddlerExists(target)) {
|
||||
className = "linkInternalResolves";
|
||||
} else if(externalRegExp.test(target)) {
|
||||
className = "linkExternal";
|
||||
} else {
|
||||
className = "linkInternalMissing";
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user