1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-03-18 20:13:32 +01:00

Fix broken highlight groups.

--HG--
extra : rebase_source : 64e041fcdc00122ae86be1e2d97d84f101a62eae
This commit is contained in:
Kris Maglione
2009-10-31 13:20:01 -04:00
parent 161001c216
commit a9034d8559

View File

@@ -9,7 +9,7 @@
* @constant * @constant
* @property {string} The default highlighting rules. They have the * @property {string} The default highlighting rules. They have the
* form: * form:
* rule ::= selector space css * rule ::= selector space space+ css
* selector ::= group * selector ::= group
* | group "," css-selector * | group "," css-selector
* | group "," css-selector "," scope * | group "," css-selector "," scope
@@ -303,7 +303,7 @@ function Highlights(name, store)
*/ */
this.loadCSS = function (css) this.loadCSS = function (css)
{ {
css.replace(/^(\s*\S*\s+)\{((?:.|\n)*?)\}\s*$/gm, function (_, _1, _2) _1 + _2.replace(/\n\s*/g, " ")) css.replace(/^(\s*\S*\s+)\{((?:.|\n)*?)\}\s*$/gm, function (_, _1, _2) _1 + " " + _2.replace(/\n\s*/g, " "))
.split("\n").filter(function (s) /\S/.test(s)) .split("\n").filter(function (s) /\S/.test(s))
.forEach(function (style) .forEach(function (style)
{ {