1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-06-16 02:19:55 +00:00

simplified regexp

Ok, I think I've got it now. The following matches all...

1. starting with a literal `$:`
2. then any number of character not a whitespace, `<` or  `|`
3. closing with anything that is, again, not a whitespace, `<` or  `|`

Test here...

http://tbdemo.tiddlyspot.com/#Autolink%20System%20Tiddlers
This commit is contained in:
Tobias Beer 2015-01-11 11:04:02 +01:00
parent 795a929187
commit b43d4a33d6

View File

@ -18,7 +18,7 @@ exports.types = {inline: true};
exports.init = function(parser) {
this.parser = parser;
// Regexp to match
this.matchRegExp = /~?(?:\$):[^\s<>{}\[\]`|'"\\^~]+(?:\/|\b)/mg;
this.matchRegExp = /~?\$:[^\s<|]+(?:[^\s<|])/mg;
};
exports.parse = function() {