mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-07-03 14:09:06 +02: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:
@@ -475,8 +475,8 @@ export const paste = async (protyle: IProtyle, event: (ClipboardEvent | DragEven
|
||||
const tempDiv = document.createElement("div");
|
||||
tempDiv.innerHTML = textHTML;
|
||||
const walker = document.createTreeWalker(tempDiv, NodeFilter.SHOW_TEXT, null);
|
||||
let node;
|
||||
while (node = walker.nextNode()) {
|
||||
let node: Node | null = null;
|
||||
while ((node = walker.nextNode())) {
|
||||
if (node.nodeValue && (node.nodeValue.match(/\n/g) || []).length >= 2) {
|
||||
containsNewlines = true;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user