Skip to content

Commit

Permalink
Merge pull request #1448 from UziTech/version
Browse files Browse the repository at this point in the history
Version
  • Loading branch information
styfle authored Mar 12, 2019
2 parents 5d6bde0 + 843ebd2 commit d069d0d
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 14 deletions.
8 changes: 8 additions & 0 deletions bin/marked
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ function help() {
});
}

function version() {
var pkg = require('../package.json');
console.log(pkg.version);
}

/**
* Main
*/
Expand Down Expand Up @@ -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-)?/, ''));
Expand Down
14 changes: 7 additions & 7 deletions man/marked.1
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand All @@ -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.
Expand Down Expand Up @@ -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.
Expand Down
19 changes: 12 additions & 7 deletions man/marked.1.txt
Original file line number Diff line number Diff line change
@@ -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 <output>] [-i <input>] [--help] [--tokens] [--pedantic] [--gfm] [--breaks] [--tables] [--sanitize] [--smart-lists]
[--lang-prefix <prefix>] [--no-etc...] [--silent] [filename]
marked [-o <output>] [-i <input>] [--help] [--tokens]
[--pedantic] [--gfm] [--breaks] [--tables] [--sanitize]
[--smart-lists] [--lang-prefix <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
Expand All @@ -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.

Expand All @@ -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.

Expand Down Expand Up @@ -91,4 +96,4 @@ LICENSE
SEE ALSO
markdown(1), node.js(1)

v0.3.1 2014-01-31 marked(1)
marked(1)

0 comments on commit d069d0d

Please sign in to comment.