diff --git a/src/editor/lang-heynote/nested-parser.js b/src/editor/lang-heynote/nested-parser.js index 4b5aa8e..3a1c338 100644 --- a/src/editor/lang-heynote/nested-parser.js +++ b/src/editor/lang-heynote/nested-parser.js @@ -22,7 +22,13 @@ export function configureNesting() { if (id == NoteContent) { let noteLang = node.node.parent.firstChild.getChildren(NoteLanguage)[0] let langName = input.read(noteLang?.from, noteLang?.to) - //console.log("langName:", langName) + + // if the NoteContent is empty, we don't want to return a parser, since that seems to cause an + // error for StreamLanguage parsers when the buffer size is large (e.g >300 kb) + if (node.node.from == node.node.to) { + return null + } + if (langName in languageMapping && languageMapping[langName] !== null) { //console.log("found parser for language:", langName) return {