Skip to content

Commit

Permalink
Merge pull request #106 from chris--jones/gulpfile_fix
Browse files Browse the repository at this point in the history
Fix gulp file regex - was not catering for whitespace correctly.
  • Loading branch information
tobiasahlin committed Nov 23, 2015
2 parents 62cedc4 + fca7e32 commit c570abe
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ var htmlDir = './examples',
</html>';

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) {
Expand Down

0 comments on commit c570abe

Please sign in to comment.