mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-03-11 20:45:46 +01:00
Load REPL styles when displaying help pages.
This commit is contained in:
@@ -186,11 +186,12 @@ var ConfigBase = Class("ConfigBase", {
|
|||||||
"version"
|
"version"
|
||||||
],
|
],
|
||||||
|
|
||||||
|
helpStyles: /^(Help|StatusLine|REPL)|^(Boolean|Indicator|MoreMsg|Number|Object|Logo|Key(word)?|String)$/,
|
||||||
styleHelp: function styleHelp() {
|
styleHelp: function styleHelp() {
|
||||||
if (!this.helpStyled) {
|
if (!this.helpStyled) {
|
||||||
const { highlight } = require("highlight");
|
const { highlight } = require("highlight");
|
||||||
for (let k in keys(highlight.loaded))
|
for (let k in keys(highlight.loaded))
|
||||||
if (/^(Help|StatusLine)|^(Boolean|Indicator|MoreMsg|Number|Logo|Key(word)?|String)$/.test(k))
|
if (this.helpStyles.test(k))
|
||||||
highlight.loaded[k] = true;
|
highlight.loaded[k] = true;
|
||||||
}
|
}
|
||||||
this.helpCSS = true;
|
this.helpCSS = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user