mirror of
https://github.com/heyman/heynote.git
synced 2024-11-21 23:43:22 +01:00
Fix bug where language auto detection will not trigger in some cases
E.g. if you pasted a piece of javascript, selected the whole block and deleted the text (which will change back the default language to Plaintext (auto)) and then paste the same javascript code again.
This commit is contained in:
parent
206abbc31c
commit
bb9a39fe6e
@ -79,6 +79,7 @@ export function languageDetection(getView) {
|
||||
if (block.language.name !== "text") {
|
||||
changeLanguageTo(view.state, view.dispatch, block, "text", true)
|
||||
}
|
||||
delete previousBlockContent[idx]
|
||||
}
|
||||
if (content.length <= 8) {
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user