You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ripple.apache.org by br...@apache.org on 2015/03/04 22:21:18 UTC
incubator-ripple git commit: The ASF comments are showing up in cli
help logs.
Repository: incubator-ripple
Updated Branches:
refs/heads/master accdcd416 -> 9d1b0d148
The ASF comments are showing up in cli help logs.
The rather interesting way comments are logged does not include
stripping out any comments.
This is a hasty way, although there could be better alternatives
in the future.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ripple/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ripple/commit/9d1b0d14
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ripple/tree/9d1b0d14
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ripple/diff/9d1b0d14
Branch: refs/heads/master
Commit: 9d1b0d148f40d8262038446a3b14c00d0d807acb
Parents: accdcd4
Author: Brent Lintner <br...@gmail.com>
Authored: Tue Mar 3 14:25:59 2015 -0500
Committer: Brent Lintner <br...@gmail.com>
Committed: Wed Mar 4 10:28:35 2015 -0500
----------------------------------------------------------------------
lib/cli/help.js | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ripple/blob/9d1b0d14/lib/cli/help.js
----------------------------------------------------------------------
diff --git a/lib/cli/help.js b/lib/cli/help.js
index bc4224b..c97fb87 100644
--- a/lib/cli/help.js
+++ b/lib/cli/help.js
@@ -21,12 +21,17 @@
var fs = require('fs'),
path = require('path'),
- colors = require('colors');
+ colors = require('colors'),
+ MD_COMMENTS = /\s*<\!\-\-(.|\n)*\-\-\>\s*/g;
colors.mode = "console";
function style(command) {
- var raw = fs.readFileSync(path.join(__dirname, '..', '..', 'doc', 'cli', command + ".md")).toString('utf8').split("\n");
+ var raw = fs
+ .readFileSync(path.join(__dirname, '..', '..', 'doc', 'cli', command + ".md"))
+ .toString('utf8')
+ .replace(MD_COMMENTS, "")
+ .split("\n");
return raw.map(function (line) {
if (line.match(/^# /)) {