mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-02-08 23:20:03 +00:00
Fix regexp performance problem introduced in c7b31b02422265e11b68992e58ef5638cf2e568e
This fixes a problem introduced in c7b31b02422265e11b68992e58ef5638cf2e568e. 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…
x
Reference in New Issue
Block a user