Skip to content

Commit

Permalink
Fix gulp file regex - was not catering for whitespace correctly.
Browse files Browse the repository at this point in the history
  • Loading branch information
chris--jones committed Nov 18, 2015
1 parent 62cedc4 commit fca7e32
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 fca7e32

Please sign in to comment.