mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 14:40:12 +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");
|
||||
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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue