react-smart-copy 1.29.2 → 1.30.0
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.
- package/README.md +2 -2
- package/dist/code.cjs +2 -1
- package/dist/code.cjs.map +1 -1
- package/dist/code.js +2 -1
- package/dist/code.js.map +1 -1
- package/dist/markdown.cjs +38 -2
- package/dist/markdown.cjs.map +1 -1
- package/dist/markdown.d.cts +5 -0
- package/dist/markdown.d.ts +5 -0
- package/dist/markdown.js +38 -2
- package/dist/markdown.js.map +1 -1
- package/dist/rich.cjs +2 -2
- package/dist/rich.cjs.map +1 -1
- package/dist/rich.js +2 -2
- package/dist/rich.js.map +1 -1
- package/package.json +4 -4
package/dist/rich.js
CHANGED
|
@@ -751,7 +751,7 @@ var Builder = class {
|
|
|
751
751
|
this.remove("unsafe-element", tag);
|
|
752
752
|
return;
|
|
753
753
|
}
|
|
754
|
-
if (source.hasAttribute("data-copy-ignore") || source.hasAttribute("hidden") || source.getAttribute("aria-hidden") === "true" || this.ignore !== null && source.matches(this.ignore)) {
|
|
754
|
+
if (source.hasAttribute("data-copy-ignore") || source.hasAttribute("hidden") || source.getAttribute("aria-hidden") === "true" && tag !== "br" || this.ignore !== null && source.matches(this.ignore)) {
|
|
755
755
|
this.remove("ignored", tag);
|
|
756
756
|
return;
|
|
757
757
|
}
|
|
@@ -1234,7 +1234,7 @@ const MAX_DEPTH = 200;
|
|
|
1234
1234
|
/** Most characters of pasted HTML read. */
|
|
1235
1235
|
const MAX_INPUT = 16777216;
|
|
1236
1236
|
function isHidden(element, style) {
|
|
1237
|
-
return element.hasAttribute("hidden") || element.getAttribute("aria-hidden") === "true" || style.get("display") === "none" || style.get("visibility") === "hidden" || style.get("mso-list") === "ignore";
|
|
1237
|
+
return element.hasAttribute("hidden") || element.getAttribute("aria-hidden") === "true" && element.localName !== "br" || style.get("display") === "none" || style.get("visibility") === "hidden" || style.get("mso-list") === "ignore";
|
|
1238
1238
|
}
|
|
1239
1239
|
const isWordListParagraph = (node) => node.nodeType === 1 && WORD_LIST.test(node.getAttribute("style") ?? "");
|
|
1240
1240
|
/**
|