diff options
Diffstat (limited to 'js/lib/xml.js')
-rw-r--r-- | js/lib/xml.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/js/lib/xml.js b/js/lib/xml.js index e867fdc..ada61f7 100644 --- a/js/lib/xml.js +++ b/js/lib/xml.js @@ -91,16 +91,16 @@ var renderNodes = function(block) { switch (nodetype) { case 'List': var data = node.list_data; - if (data.type !== undefined) { + if (data.type !== null) { attrs.push(['type', data.type.toLowerCase()]); } - if (data.start !== undefined) { + if (data.start !== null) { attrs.push(['start', String(data.start)]); } - if (data.tight !== undefined) { + if (data.tight !== null) { attrs.push(['tight', (data.tight ? 'true' : 'false')]); } - if (data.delimiter !== undefined) { + if (data.delimiter !== null) { var delimword = ''; if (data.delimiter === '.') { delimword = 'period'; @@ -128,7 +128,7 @@ var renderNodes = function(block) { } if (options.sourcepos) { var pos = node.sourcepos; - if (pos !== undefined) { + if (pos) { attrs.push(['data-sourcepos', String(pos[0][0]) + ':' + String(pos[0][1]) + '-' + String(pos[1][0]) + ':' + String(pos[1][1])]); |