making REGEXP a bit stricter.

This commit is contained in:
Jeremy Ashkenas 2010-11-09 22:22:02 -05:00
parent bc0cc34420
commit 71db1fc142
2 changed files with 2 additions and 2 deletions

View File

@ -622,7 +622,7 @@
MULTI_DENT = /^(?:\n[^\n\S]*)+/;
SIMPLESTR = /^'[^\\']*(?:\\.[^\\']*)*'/;
JSTOKEN = /^`[^\\`]*(?:\\.[^\\`]*)*`/;
REGEX = /^\/(?!\s)[^[\/\n\\]*(?:(?:\\[\s\S]|\[[^\]\n\\]*(?:\\[\s\S][^\]\n\\]*)*])[^[\/\n\\]*)*\/[imgy]{0,4}(?![A-Za-z])/;
REGEX = /^\/(?!\s)[^[\/\n\\]*(?:(?:\\[\s\S]|\[[^\]\n\\]*(?:\\[\s\S][^\]\n\\]*)*])[^[\/\n\\]*)*\/[imgy]{0,4}(?![A-Za-z0-9])/;
HEREGEX = /^\/{3}([\s\S]+?)\/{3}([imgy]{0,4})(?![A-Za-z])/;
HEREGEX_OMIT = /\s+(?:#.*)?/g;
MULTILINER = /\n/g;

View File

@ -584,7 +584,7 @@ REGEX = /// ^
]
) [^ [ / \n \\ ]*
)*
/ [imgy]{0,4} (?![A-Za-z])
/ [imgy]{0,4} (?![A-Za-z0-9])
///
HEREGEX = /^\/{3}([\s\S]+?)\/{3}([imgy]{0,4})(?![A-Za-z])/