This commit is contained in:
John McLear 2021-01-14 17:02:43 +00:00
parent b876e2dfe0
commit d9ca1efd4f
2 changed files with 7 additions and 11 deletions

View file

@ -394,11 +394,10 @@ const makeContentCollector = function (
const styl = dom.nodeAttr(node, 'style'); const styl = dom.nodeAttr(node, 'style');
const cls = dom.nodeAttr(node, 'class'); const cls = dom.nodeAttr(node, 'class');
// clear to avoid pollution of trailing blank lines after lines with attributes // clear to avoid pollution of trailing blank lines after image lines
// during import // with attributes during import
if (state.lineAttributes) { if (state.lineAttributes && state.lineAttributes.img) {
delete state.lineAttributes; delete state.lineAttributes.img;
state.lineAttributes = {};
} }
if (tname === 'img') { if (tname === 'img') {
@ -420,7 +419,6 @@ const makeContentCollector = function (
// be present in the line itself, not in any attributes of a line.. // be present in the line itself, not in any attributes of a line..
// uncommenting the below will make duplicate images.. :) // uncommenting the below will make duplicate images.. :)
if (state.lineAttributes) delete state.lineAttributes; if (state.lineAttributes) delete state.lineAttributes;
console.warn("state", state);
this.breakLine = true; this.breakLine = true;
const tvalue = dom.nodeAttr(node, 'value'); const tvalue = dom.nodeAttr(node, 'value');
const induceLineBreak = hooks.callAll('collectContentLineBreak', { const induceLineBreak = hooks.callAll('collectContentLineBreak', {

File diff suppressed because one or more lines are too long