From e884844dadd14a6aac592529817aac6c67056e1f Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Fri, 13 Jul 2007 16:40:36 +0000 Subject: [PATCH] remove the trailing HR from the help tables --- chrome/content/vimperator/help.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/chrome/content/vimperator/help.js b/chrome/content/vimperator/help.js index 201e24e5..044004ea 100644 --- a/chrome/content/vimperator/help.js +++ b/chrome/content/vimperator/help.js @@ -33,6 +33,7 @@ Vimperator.prototype.help = function(section, easter) //{{{ vimperator.echoerr("E478: Don't panic!"); return; } + if ((arguments[3] && arguments[3].inTab))// || !window.content.document.open) openURLsInNewTab("", true); else @@ -46,6 +47,7 @@ Vimperator.prototype.help = function(section, easter) //{{{ function makeHelpString(commands, beg, end, func) { var ret = ""; + var separator = '
\n'; for (var command in commands) { // the usage information for the command @@ -74,7 +76,7 @@ Vimperator.prototype.help = function(section, easter) //{{{ ret += ''; ret += command.short_help; // the help description ret += "
"; - if(func) // for options we print default values here, e.g. + if (func) // for options we print default values here, e.g. { ret += func.call(this, command); ret += "
"; @@ -103,18 +105,19 @@ Vimperator.prototype.help = function(section, easter) //{{{ ret += ''; // add more space between entries - // FIXME: if (i < commands.length-1) - ret += '
\n'; + ret += separator; } + ret = ret.replace(new RegExp(separator + '$'), ''); // FIXME: far too tasty! return ret; } + function makeOptionsHelpString(command) { var ret = ""; ret = command.type + ' (default: '; if (command.type == "boolean") { - if(command.default_value == true) + if (command.default_value == true) ret += "on"; else ret += "off";