xqin
5 months ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
9 additions and
0 deletions
-
bin/markdown-it.mjs
|
|
@ -20,6 +20,11 @@ cli.add_argument('--no-html', { |
|
|
|
action: 'store_true' |
|
|
|
}) |
|
|
|
|
|
|
|
cli.add_argument('--no-validate-link', { |
|
|
|
help: 'Disable validate Link', |
|
|
|
action: 'store_true' |
|
|
|
}) |
|
|
|
|
|
|
|
cli.add_argument('-l', '--linkify', { |
|
|
|
help: 'Autolink text', |
|
|
|
action: 'store_true' |
|
|
@ -87,6 +92,10 @@ readFile(options.file, 'utf8', function (err, input) { |
|
|
|
linkify: options.linkify |
|
|
|
}) |
|
|
|
|
|
|
|
if (options.no_validate_link) { |
|
|
|
md.validateLink = () => true |
|
|
|
} |
|
|
|
|
|
|
|
try { |
|
|
|
output = md.render(input) |
|
|
|
} catch (e) { |
|
|
|