FIX: details fixes with extra formatting

This commit is contained in:
Robin Ward
2016-07-19 15:14:55 -04:00
parent f38347400c
commit 8141e1d9bc
3 changed files with 14 additions and 4 deletions

View File

@@ -1,7 +1,7 @@
const BLOCK_TAGS = ['address', 'article', 'aside', 'audio', 'blockquote', 'canvas', 'dd', 'details',
'div', 'dl', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'h1', 'h2', 'h3',
'h4', 'h5', 'h6', 'header', 'hgroup', 'hr', 'iframe', 'noscript', 'ol', 'output',
'p', 'pre', 'section', 'table', 'tfoot', 'ul', 'video'];
'p', 'pre', 'section', 'table', 'tfoot', 'ul', 'video', 'summary'];
function splitAtLast(tag, block, next, first) {
const endTag = `</${tag}>`;
@@ -34,7 +34,7 @@ export function setup(helper) {
}
}
const m = /^<([^>]+)\>/.exec(block);
const m = /^\s*<\/?([^>]+)\>/.exec(block);
if (m && m[1]) {
const tag = m[1].split(/\s/);
if (tag && tag[0] && BLOCK_TAGS.indexOf(tag[0]) !== -1) {