Fixed regular expression for extracting tag def

This commit is contained in:
Patrick Steele-Idem 2014-04-30 10:54:19 -06:00
parent 354e61188a
commit 3adecbe56c

View File

@ -1,6 +1,6 @@
// Rather than using a full-blown JavaScript parser, we are going to use a few regular expressions
// to tokenize the code and find what we are interested in
var tagStartRegExp = /(^\s*(?:exports.(?:tag|TAG))|(?:TAG)\s*=\s*)\{/m;
var tagStartRegExp = /(^\s*(?:(?:exports.(?:tag|TAG))|(?:TAG))\s*=\s*)\{/m;
// Tokens: "<string>", '<string>', /*<some comment*/, //<single line comment>, {, }, ;
var tokensRegExp = /"(?:[^"]|\\")*"|'(?:[^'])|(\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*+\/)|(\/\/.*)|[\{\};]/g;