Skip to content

Commit

Permalink
check: empty comment also considered as empty content
Browse files Browse the repository at this point in the history
  • Loading branch information
motla committed Dec 27, 2023
1 parent 3ab45fb commit a2a1b52
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/DocumentEditor/DocumentEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ export default {
while(elt.children.length == 1 && elt.firstChild.tagName && elt.firstChild.tagName.toLowerCase() == "div" && !elt.firstChild.getAttribute("style")) {
elt = elt.firstChild;
}
return (elt.innerHTML == "<br>" ? "" : elt.innerHTML); // treat a page containing a single <br> as an empty content
return ((elt.innerHTML == "<br>" || elt.innerHTML == "<!---->") ? "" : elt.innerHTML); // treat a page containing a single <br> or an empty comment as an empty content
}).join('');
}
// if item is a component, just clone the item
Expand Down

0 comments on commit a2a1b52

Please sign in to comment.