mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-02-02 12:19:11 +00:00
Fix regexp performance problem introduced in c7b31b0242
This fixes a problem introduced in
c7b31b0242
.
The changes by @tobibeer inadvertently made the regular expression
evaluation significantly more expensive because of lookahead. The is
less elegant but reverts the performance problem.
This commit is contained in:
parent
537cfcbf79
commit
accd4a1b65
@ -19,9 +19,9 @@ exports.init = function(parser) {
|
||||
this.parser = parser;
|
||||
// Regexp to match
|
||||
this.matchRegExp = new RegExp(
|
||||
"~?\\$:\\/(?:" +
|
||||
$tw.config.textPrimitives.anyLetter +
|
||||
"|[\/._-])+",
|
||||
"~?\\$:\\/[" +
|
||||
$tw.config.textPrimitives.anyLetter.substr(1,$tw.config.textPrimitives.anyLetter.length - 2) +
|
||||
"\/._-]+",
|
||||
"mg"
|
||||
);
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user