diff options
Diffstat (limited to 'js/lib')
-rw-r--r-- | js/lib/node.js | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/js/lib/node.js b/js/lib/node.js index 9dc7c3f..ae02838 100644 --- a/js/lib/node.js +++ b/js/lib/node.js @@ -1,17 +1,21 @@ "use strict"; function isContainer(node) { - var t = node.t; - return (t === 'Document' || - t === 'BlockQuote' || - t === 'List' || - t === 'ListItem' || - t === 'Paragraph' || - t === 'Header' || - t === 'Emph' || - t === 'Strong' || - t === 'Link' || - t === 'Image'); + switch (node.t) { + case 'Document': + case 'BlockQuote': + case 'List': + case 'ListItem': + case 'Paragraph': + case 'Header': + case 'Emph': + case 'Strong': + case 'Link': + case 'Image': + return true; + default: + return false; + } } var resumeAt = function(node, entering) { |