summaryrefslogtreecommitdiff
path: root/js/bin
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2015-01-11 13:43:03 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2015-01-11 13:43:03 -0800
commitee812d1df1b237133dfaf490d6ff31f70dc73438 (patch)
tree854dd5828cd390430c8a59a70b6084a02c9e9c37 /js/bin
parentd012cefdee6235e107372dd939498a0ca107d7e0 (diff)
Start on xml.js.
Just the skeleton, mostly copied from HTML renderer. Can be simplified because of the regularity of the XML format. See #280.
Diffstat (limited to 'js/bin')
-rwxr-xr-xjs/bin/commonmark4
1 files changed, 4 insertions, 0 deletions
diff --git a/js/bin/commonmark b/js/bin/commonmark
index 8f1210b..6570ef6 100755
--- a/js/bin/commonmark
+++ b/js/bin/commonmark
@@ -15,6 +15,8 @@ for (i = 2; i < process.argv.length; i++) {
var arg = process.argv[i];
if (arg === '--ast') {
format = 'ast';
+ } else if (arg === '--xml') {
+ format = 'xml';
} else if (arg === '--time') {
options.time = true;
} else if (arg === '--sourcepos') {
@@ -32,6 +34,8 @@ var renderer;
if (format === 'html') {
renderer = new commonmark.HtmlRenderer(options);
+} else if (format === 'xml') {
+ renderer = new commonmark.XMLRenderer(options);
} else if (format === 'ast') {
renderer = new commonmark.ASTRenderer(options);
renderer.options.colors = true;