mirror of
https://github.com/marko-js/marko.git
synced 2025-12-08 19:26:05 +00:00
Fixed regular expression for extracting tag def
This commit is contained in:
parent
354e61188a
commit
3adecbe56c
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user