From 1cb6345e11fa92ca84ed084bf3abc0bd826bf53e Mon Sep 17 00:00:00 2001 From: Nelson Rodriguez Date: Mon, 2 May 2022 17:29:45 -0400 Subject: [PATCH] Adding argument to enable XHTML output --- bin/markdown-it.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/bin/markdown-it.js b/bin/markdown-it.js index d916635..f0fedba 100755 --- a/bin/markdown-it.js +++ b/bin/markdown-it.js @@ -30,6 +30,11 @@ cli.add_argument('-l', '--linkify', { action: 'store_true' }); +cli.add_argument('-x', '--xhtml', { + help: 'Output XHTML', + action: 'store_true' +}); + cli.add_argument('-t', '--typographer', { help: 'Enable smartquotes and other typographic replacements', action: 'store_true' @@ -91,7 +96,7 @@ readFile(options.file, 'utf8', function (err, input) { md = require('..')({ html: !options.no_html, - xhtmlOut: false, + xhtmlOut: options.xhtml, typographer: options.typographer, linkify: options.linkify });