From acff65bf4e3ac74fbd178c5462c580a0d0864f52 Mon Sep 17 00:00:00 2001 From: Tony Brix Date: Tue, 12 Mar 2019 09:07:26 -0500 Subject: [PATCH 1/2] add --version to marked bin --- bin/marked | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/bin/marked b/bin/marked index f72bfa00db..0ea63c540b 100755 --- a/bin/marked +++ b/bin/marked @@ -32,6 +32,11 @@ function help() { }); } +function version() { + var pkg = require('../package.json'); + console.log(pkg.version); +} + /** * Main */ @@ -98,6 +103,9 @@ function main(argv, callback) { case '-h': case '--help': return help(); + case '-v': + case '--version': + return version(); default: if (arg.indexOf('--') === 0) { opt = camelize(arg.replace(/^--(no-)?/, '')); From 843ebd2ce4461e724aa2d273cf121f72ad087c02 Mon Sep 17 00:00:00 2001 From: Tony Brix Date: Tue, 12 Mar 2019 09:07:47 -0500 Subject: [PATCH 2/2] update man pages --- man/marked.1 | 14 +++++++------- man/marked.1.txt | 19 ++++++++++++------- 2 files changed, 19 insertions(+), 14 deletions(-) diff --git a/man/marked.1 b/man/marked.1 index d2bae2f98a..848b4424ea 100644 --- a/man/marked.1 +++ b/man/marked.1 @@ -1,5 +1,5 @@ .ds q \N'34' -.TH marked 1 "2014-01-31" "v0.3.1" "marked.js" +.TH marked 1 .SH NAME marked \- a javascript markdown parser @@ -14,8 +14,8 @@ marked \- a javascript markdown parser .SH DESCRIPTION .B marked -is a full-featured javascript markdown parser, built for speed. It also includes -multiple GFM features. +is a full-featured javascript markdown parser, built for speed. +It also includes multiple GFM features. .SH EXAMPLES .TP @@ -33,8 +33,8 @@ marked \-\-output="hello world.html" \-i in.md \-\-no-breaks Specify file output. If none is specified, write to stdout. .TP .BI \-i,\ \-\-input\ [\fIinput\fP] -Specify file input, otherwise use last argument as input file. If no input file -is specified, read from stdin. +Specify file input, otherwise use last argument as input file. +If no input file is specified, read from stdin. .TP .BI \-\-test Makes sure the test(s) pass. @@ -63,8 +63,8 @@ Stop process if a test fails. Output a token stream instead of html. .TP .BI \-\-pedantic -Conform to obscure parts of markdown.pl as much as possible. Don't fix original -markdown bugs. +Conform to obscure parts of markdown.pl as much as possible. +Don't fix original markdown bugs. .TP .BI \-\-gfm Enable github flavored markdown. diff --git a/man/marked.1.txt b/man/marked.1.txt index fd65067105..ea07ad36e5 100644 --- a/man/marked.1.txt +++ b/man/marked.1.txt @@ -1,14 +1,17 @@ -marked(1) marked.js marked(1) +marked(1) General Commands Manual marked(1) NAME marked - a javascript markdown parser SYNOPSIS - marked [-o ] [-i ] [--help] [--tokens] [--pedantic] [--gfm] [--breaks] [--tables] [--sanitize] [--smart-lists] - [--lang-prefix ] [--no-etc...] [--silent] [filename] + marked [-o ] [-i ] [--help] [--tokens] + [--pedantic] [--gfm] [--breaks] [--tables] [--sanitize] + [--smart-lists] [--lang-prefix ] [--no-etc...] [--silent] + [filename] DESCRIPTION - marked is a full-featured javascript markdown parser, built for speed. It also includes multiple GFM features. + marked is a full-featured javascript markdown parser, built for speed. + It also includes multiple GFM features. EXAMPLES cat in.md | marked > out.html @@ -24,7 +27,8 @@ OPTIONS Specify file output. If none is specified, write to stdout. -i, --input [input] - Specify file input, otherwise use last argument as input file. If no input file is specified, read from stdin. + Specify file input, otherwise use last argument as input file. + If no input file is specified, read from stdin. --test Makes sure the test(s) pass. @@ -44,7 +48,8 @@ OPTIONS Output a token stream instead of html. --pedantic - Conform to obscure parts of markdown.pl as much as possible. Don't fix original markdown bugs. + Conform to obscure parts of markdown.pl as much as possible. + Don't fix original markdown bugs. --gfm Enable github flavored markdown. @@ -91,4 +96,4 @@ LICENSE SEE ALSO markdown(1), node.js(1) -v0.3.1 2014-01-31 marked(1) + marked(1)