diff options
author | John MacFarlane <jgm@berkeley.edu> | 2015-01-11 13:43:03 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2015-01-11 13:43:03 -0800 |
commit | ee812d1df1b237133dfaf490d6ff31f70dc73438 (patch) | |
tree | 854dd5828cd390430c8a59a70b6084a02c9e9c37 /js/bin | |
parent | d012cefdee6235e107372dd939498a0ca107d7e0 (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-x | js/bin/commonmark | 4 |
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; |