mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 22:50:13 +01:00
🎨 Improve HTML underline style clipping https://github.com/siyuan-note/siyuan/issues/14804
fix lint Signed-off-by: Daniel <845765@qq.com>
This commit is contained in:
parent
d5257471fd
commit
5ccb95ae4e
1 changed files with 2 additions and 2 deletions
|
|
@ -475,8 +475,8 @@ export const paste = async (protyle: IProtyle, event: (ClipboardEvent | DragEven
|
||||||
const tempDiv = document.createElement("div");
|
const tempDiv = document.createElement("div");
|
||||||
tempDiv.innerHTML = textHTML;
|
tempDiv.innerHTML = textHTML;
|
||||||
const walker = document.createTreeWalker(tempDiv, NodeFilter.SHOW_TEXT, null);
|
const walker = document.createTreeWalker(tempDiv, NodeFilter.SHOW_TEXT, null);
|
||||||
let node;
|
let node: Node | null = null;
|
||||||
while (node = walker.nextNode()) {
|
while ((node = walker.nextNode())) {
|
||||||
if (node.nodeValue && (node.nodeValue.match(/\n/g) || []).length >= 2) {
|
if (node.nodeValue && (node.nodeValue.match(/\n/g) || []).length >= 2) {
|
||||||
containsNewlines = true;
|
containsNewlines = true;
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue