From cb147df4f40617f6a92a352a5f7febd20cc5c77c Mon Sep 17 00:00:00 2001 From: Paul Irish Date: Mon, 25 Aug 2014 21:59:17 -0700 Subject: [PATCH] nongreedy regex for doc pulling. See https://github.com/Modernizr/modernizr-ui/issues/7 --- lib/generate-meta.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/generate-meta.js b/lib/generate-meta.js index 3bf90bad35..316de1a757 100644 --- a/lib/generate-meta.js +++ b/lib/generate-meta.js @@ -17,7 +17,7 @@ file.walkSync(viewRoot, function (start, dirs, files) { // TODO :: make this regex not suck var metaRE = /\/\*\!([\s\S]*)\!\*\//m; var matches = test.match(metaRE); - var docRE = /\/\*\sDOC([\s\S]*)\*\//m; + var docRE = /\/\*\sDOC([\s\S]*?)\*\//m; var docmatches = test.match(docRE); var depRE = /define\((\[[^\]]*\]),/; var depMatches = test.match(depRE);