I'm using CodeMirror to author mixed-content documents (primarily a custom language mode embedded into markdown codeblocks). Unfortunately, when I use the custom language mode by itself, indentation works as expected, but when it's used as a sub-mode of GFM, indentation appears to purely follow the previous line's indentation level. The codeblock has the appropriate language identifier. All syntax highlighting still works, and the custom mode is actually working, it just isn't in control of indentation.
The custom mode is written using the simple mode addon, and I dropped a
codemirror/addon/mode/simple.js#L195 and confirmed that, when used directly the function is invoked for indentation, but when used as a submode it is not.
This is the snipped setup for the editor. All the custom-mode specific setup is in the
import * as CodeMirror from "codemirror";
// GFM-embedded multi-mode editing for Eve Documents.
Is there anything obviously wrong with my setup? If not I'd be happy to move this to GitHub issues and provide any additional diagnostic information that might be useful.