mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-21 20:07:59 +01:00
fixed display of <> in help
This commit is contained in:
@@ -86,8 +86,12 @@ function help(section, easter)
|
||||
{
|
||||
var usage = commands[i][USAGE][j];
|
||||
|
||||
usage = usage.replace(/<(?!br\/>)/g, "<");
|
||||
usage = usage.replace(/[^b][^r][^\/]>/g, ">");
|
||||
// keep <br/>
|
||||
//usage = usage.replace(/<([^b][^r].*>)/g, "<$1");
|
||||
//usage = usage.replace(/[^b][^r][^\/]>/g, ">");
|
||||
usage = usage.replace(/</g, "<");
|
||||
usage = usage.replace(/>/g, ">");
|
||||
usage = usage.replace(/\\n/g, "<br/>");
|
||||
// color {count} and [url] arguments in the usage, not nice and error prone but the regexp work (for now)
|
||||
usage = usage.replace(/(^|;|\n|\s|\]|\}|=|<br\/?>)({.*?}|\[.*?\])/gm, "$1<span class=argument>$2</span>");
|
||||
// and the 'setting' in a different color
|
||||
|
||||
Reference in New Issue
Block a user