mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-31 01:12:27 +01:00
Death to E4X and stuff.
This commit is contained in:
@@ -10,7 +10,7 @@ defineModule("highlight", {
|
||||
});
|
||||
|
||||
lazyRequire("styles", ["Styles", "styles"]);
|
||||
lazyRequire("template", ["template"]);
|
||||
lazyRequire("template", ["template", "template_"]);
|
||||
|
||||
var Highlight = Struct("class", "selector", "sites",
|
||||
"defaultExtends", "defaultValue",
|
||||
@@ -345,14 +345,14 @@ var Highlights = Module("Highlight", {
|
||||
|
||||
if (!modify)
|
||||
modules.commandline.commandOutput(
|
||||
template.tabular(["Key", "Sample", "Link", "CSS"],
|
||||
template_.tabular(["Key", "Sample", "Link", "CSS"],
|
||||
["padding: 0 1em 0 0; vertical-align: top; max-width: 16em; overflow: hidden;",
|
||||
"text-align: center"],
|
||||
([h.class,
|
||||
<span style={"text-align: center; line-height: 1em;" + h.value + style}>XXX</span>,
|
||||
template.map(h.extends, function (s) template.highlight(s), <>,</>),
|
||||
template.highlightRegexp(h.value, /\b[-\w]+(?=:)|\/\*.*?\*\//g,
|
||||
function (match) <span highlight={match[0] == "/" ? "Comment" : "Key"}>{match}</span>)
|
||||
["span", { style: "text-align: center; line-height: 1em;" + h.value + style }, "XXX"],
|
||||
template_.map(h.extends, function (s) template.highlight(s), ","),
|
||||
template_.highlightRegexp(h.value, /\b[-\w]+(?=:)|\/\*.*?\*\//g,
|
||||
function (match) ["span", { highlight: match[0] == "/" ? "Comment" : "Key" }, match])
|
||||
]
|
||||
for (h in highlight)
|
||||
if (!key || h.class.indexOf(key) > -1))));
|
||||
|
||||
Reference in New Issue
Block a user