From a0cbcefe82a6bff0a9b44550e22244d6d5d727c0 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Sun, 11 Jan 2015 21:11:31 -0800 Subject: A few changes to JS so its xml matches cmark's. Always add '' as title property if title is not defined. --- js/lib/xml.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'js/lib/xml.js') 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)]); -- cgit v1.2.3