@flozy/editor 6.0.8 → 6.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -30,6 +30,8 @@ const parseCopiedHTML = html => {
|
|
30
30
|
|
31
31
|
// claude.ai, copy list inbetween, some li tags are not wrapped with ul or ol
|
32
32
|
parsed.querySelectorAll("li").forEach(li => {
|
33
|
+
li.innerHTML = li.innerHTML.replace(/^\n+|\n+$/g, ""); // Removes leading and trailing newlines
|
34
|
+
|
33
35
|
// Check if the parent of <li> is not a <ul> or <ol>
|
34
36
|
if (!li.parentElement || li.parentElement.tagName !== "UL" && li.parentElement.tagName !== "OL") {
|
35
37
|
// Create a <ul> element
|