summaryrefslogtreecommitdiff
path: root/js/lib/xml.js
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2015-01-11 21:11:31 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2015-01-11 21:11:55 -0800
commita0cbcefe82a6bff0a9b44550e22244d6d5d727c0 (patch)
tree8b1504dedba9684e0d67ea6dc95571af53aecef0 /js/lib/xml.js
parent3b3c5c9502252a2ce13a7daffa80da2709d586e1 (diff)
A few changes to JS so its xml matches cmark's.
Always add '' as title property if title is not defined.
Diffstat (limited to 'js/lib/xml.js')
-rw-r--r--js/lib/xml.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/js/lib/xml.js b/js/lib/xml.js
index 30b44c8..056bcc5 100644
--- a/js/lib/xml.js
+++ b/js/lib/xml.js
@@ -111,7 +111,9 @@ var renderNodes = function(block) {
}
break;
case 'CodeBlock':
- attrs.push(['info', node.info]);
+ if (node.info) {
+ attrs.push(['info', node.info]);
+ }
break;
case 'Header':
attrs.push(['level', String(node.level)]);