li issues
This commit is contained in:
parent
cf32bc26c8
commit
13d24316a5
@ -40,11 +40,17 @@ var sourceVisible = localStorage.getItem('source-visible') === 'true';
|
|||||||
case 'H5':
|
case 'H5':
|
||||||
case 'H6':
|
case 'H6':
|
||||||
case 'HEADER':
|
case 'HEADER':
|
||||||
case 'LI':
|
|
||||||
if (processBlock(node)) {
|
if (processBlock(node)) {
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case 'LI':
|
||||||
|
if($(node).find('p').length <= 1){
|
||||||
|
if (processBlock(node)) {
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
case 'TD':
|
case 'TD':
|
||||||
case 'TH':
|
case 'TH':
|
||||||
processContainer(node);
|
processContainer(node);
|
||||||
@ -54,11 +60,11 @@ var sourceVisible = localStorage.getItem('source-visible') === 'true';
|
|||||||
if (node.children.length > 0) {
|
if (node.children.length > 0) {
|
||||||
processContainer(node);
|
processContainer(node);
|
||||||
// For <li><p>...</p></li>, processes it as block.
|
// For <li><p>...</p></li>, processes it as block.
|
||||||
if (node.children.length === 1) {
|
// if (node.children.length === 1) {
|
||||||
if (processBlock(node)) {
|
// if (processBlock(node)) {
|
||||||
i++;
|
// i++;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -107,7 +113,7 @@ var sourceVisible = localStorage.getItem('source-visible') === 'true';
|
|||||||
function attributesToString(node) {
|
function attributesToString(node) {
|
||||||
return _.chain(node.attributes)
|
return _.chain(node.attributes)
|
||||||
.map(function (value) {
|
.map(function (value) {
|
||||||
if (value.name === 'id' || value.name === 'class') {
|
if (value.name === 'id') {
|
||||||
return '';
|
return '';
|
||||||
} else {
|
} else {
|
||||||
return value.name + '=' + value.value;
|
return value.name + '=' + value.value;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user