mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-21 14:09:34 +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 =
|
const isVSCode =
|
||||||
vscode ||
|
vscode ||
|
||||||
(document.body.firstElementChild instanceof HTMLDivElement &&
|
(document.body.firstElementChild instanceof HTMLDivElement &&
|
||||||
document.body.firstElementChild.style.fontFamily ===
|
document.body.firstElementChild.style.fontFamily.includes("monospace") &&
|
||||||
`'Droid Sans Mono', 'monospace', monospace`);
|
document.body.firstElementChild.style.whiteSpace.includes("pre"));
|
||||||
|
|
||||||
const language =
|
const language =
|
||||||
vscodeData?.mode ||
|
vscodeData?.mode ||
|
||||||
|
|||||||
Reference in New Issue
Block a user