From fca7e3285dcf1da75402968894012771254baa2b Mon Sep 17 00:00:00 2001 From: Chris Jones Date: Wed, 18 Nov 2015 21:42:43 +1100 Subject: [PATCH] Fix gulp file regex - was not catering for whitespace correctly. --- gulpfile.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gulpfile.js b/gulpfile.js index 8444b83..b60299c 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -24,7 +24,8 @@ var htmlDir = './examples', '; var getHtmlUsageExample = function(cssContent) { - return cssContent.match(/Usage:([\s\S]+\*.+\>)/)[1].replace(/ \*/g, ''); + var match = cssContent.match(/Usage:([\s\S]+\*[.\s\S]+\>)/); + return match && match.length > 1 ? match[1].replace(/ \*/g, '') : ''; }; gulp.task('clean-styles', function(cb) {