Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version #1448

Merged
merged 2 commits into from
Mar 12, 2019
Merged

Version #1448

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)