Skip to content

Commit

Permalink
Update regular expression to "match everything until", instead of "ma…
Browse files Browse the repository at this point in the history
…tch everything except". This resolves issues with using asterisks inside metadata.
  • Loading branch information
doctyper committed Jun 13, 2013
1 parent 9dad6bb commit bd59a34
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/generate-meta.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ file.walkSync(viewRoot, function (start, dirs, files) {
}
var test = fs.readFileSync(start + '/' + file, 'utf8');
// TODO :: make this regex not suck
var metaRE = /\/\*\!([^\!\*]*)\!\*\//m;
var metaRE = /\/\*\!([\s\S]*)\!\*\//m;
var matches = test.match(metaRE);
var docRE = /\/\*\sDOC([^\!\*]*)\*\//m;
var docRE = /\/\*\sDOC([\s\S]*)\*\//m;
var docmatches = test.match(docRE);
var depRE = /define\((\[[^\]]*\]),/;
var depMatches = test.match(depRE);
Expand Down

0 comments on commit bd59a34

Please sign in to comment.