mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-16 19:57:52 +01:00
editor: improve code block detection when pasting from vscode
This commit is contained in:
committed by
Abdullah Atta
parent
8b056fe610
commit
8299ea909e
@@ -787,8 +787,8 @@ function detectCodeBlock(dataTransfer: DataTransfer) {
|
||||
const isVSCode =
|
||||
vscode ||
|
||||
(document.body.firstElementChild instanceof HTMLDivElement &&
|
||||
document.body.firstElementChild.style.fontFamily ===
|
||||
`'Droid Sans Mono', 'monospace', monospace`);
|
||||
document.body.firstElementChild.style.fontFamily.includes("monospace") &&
|
||||
document.body.firstElementChild.style.whiteSpace.includes("pre"));
|
||||
|
||||
const language =
|
||||
vscodeData?.mode ||
|
||||
|
||||
Reference in New Issue
Block a user