Fixed a problem parsing Font Awesome's CSS file; also updated FA to 4.4.0.

This commit is contained in:
Ian Prest 2015-09-29 23:02:14 -04:00
parent c13b605c88
commit 50347112a6
2 changed files with 11 additions and 9 deletions

View File

@ -40,7 +40,7 @@
"crypto-js": "3.1.5",
"ng-file-upload": "5.0.9",
"angular-ui-bootstrap": "0.12.0",
"fontawesome": "4.3.0",
"fontawesome": "4.4.0",
"hint.css": "1.3.5",
"angular-cookies": "1.2.28",
"ace-builds": "1.2.0",

View File

@ -213,15 +213,17 @@ var $renderKey = (typeof(exports) !== 'undefined') ? exports : {};
// Find rules that look like glyphs
var glyphs = [];
rules.forEach(function(rule) {
if(!rule.name && rule.selector.length === 1) {
var matches = rule.selector[0].match(/^\.([a-zA-Z0-9]+)-([-a-zA-Z0-9]+)\:(before|after)$/);
if(matches) {
var theClass = classes.indexOf(matches[1]);
if(theClass != -1) {
var glyph = { name: matches[2], html: "<i class='" + classes[theClass] + " " + matches[1]+"-"+matches[2] +"'></i>" };
glyphs.push(glyph);
if(!rule.name && rule.selector.length > 0) {
rule.selector.forEach(function(selector) {
var matches = selector.match(/^\.([a-zA-Z0-9]+)-([-a-zA-Z0-9]+)\:(before|after)$/);
if(matches) {
var theClass = classes.indexOf(matches[1]);
if(theClass != -1) {
var glyph = { name: matches[2], html: "<i class='" + classes[theClass] + " " + matches[1]+"-"+matches[2] +"'></i>" };
glyphs.push(glyph);
}
}
}
});
}
});
glyphs.sort(function(a,b) { return a.name.localeCompare(b.name); });