aboutsummaryrefslogtreecommitdiffstats
path: root/bower_components/bootstrap/grunt/bs-glyphicons-data-generator.js
diff options
context:
space:
mode:
authorLibravatarAgustin Henze <tin@sluc.org.ar>2015-07-08 07:35:02 -0300
committerLibravatarAgustin Henze <tin@sluc.org.ar>2015-07-08 07:35:02 -0300
commitb0b24795b24ee6809397fbbadf42f31f310a219f (patch)
tree46d05bb47460b4ec679211717c4ab07414b80d9c /bower_components/bootstrap/grunt/bs-glyphicons-data-generator.js
parent5ec02211214350ee558fd9f6bb052264fd24f75e (diff)
Imported Upstream version 7.6.0upstream/7.6.0
Diffstat (limited to 'bower_components/bootstrap/grunt/bs-glyphicons-data-generator.js')
-rw-r--r--bower_components/bootstrap/grunt/bs-glyphicons-data-generator.js9
1 files changed, 5 insertions, 4 deletions
diff --git a/bower_components/bootstrap/grunt/bs-glyphicons-data-generator.js b/bower_components/bootstrap/grunt/bs-glyphicons-data-generator.js
index 82dc727..af2a82e 100644
--- a/bower_components/bootstrap/grunt/bs-glyphicons-data-generator.js
+++ b/bower_components/bootstrap/grunt/bs-glyphicons-data-generator.js
@@ -1,10 +1,12 @@
/*!
* Bootstrap Grunt task for Glyphicons data generation
* http://getbootstrap.com
- * Copyright 2014 Twitter, Inc.
+ * Copyright 2014-2015 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
+
'use strict';
+
var fs = require('fs');
module.exports = function generateGlyphiconsData(grunt) {
@@ -14,7 +16,7 @@ module.exports = function generateGlyphiconsData(grunt) {
var glyphiconsLines = glyphiconsFile.split('\n');
// Use any line that starts with ".glyphicon-" and capture the class name
- var iconClassName = /^\.(glyphicon-[^\s]+)/;
+ var iconClassName = /^\.(glyphicon-[a-zA-Z0-9-]+)/;
var glyphiconsData = '# This file is generated via Grunt task. **Do not edit directly.**\n' +
'# See the \'build-glyphicons-data\' task in Gruntfile.js.\n\n';
var glyphiconsYml = 'docs/_data/glyphicons.yml';
@@ -33,8 +35,7 @@ module.exports = function generateGlyphiconsData(grunt) {
try {
fs.writeFileSync(glyphiconsYml, glyphiconsData);
- }
- catch (err) {
+ } catch (err) {
grunt.fail.warn(err);
}
grunt.log.writeln('File ' + glyphiconsYml.cyan + ' created.');