mirror of
https://github.com/ijprest/keyboard-layout-editor
synced 2024-11-11 13:10:29 +00:00
Fixed a problem parsing Font Awesome's CSS file; also updated FA to 4.4.0.
This commit is contained in:
parent
c13b605c88
commit
50347112a6
@ -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",
|
||||
|
18
render.js
18
render.js
@ -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); });
|
||||
|
Loading…
Reference in New Issue
Block a user