By default line numbers are not showed in code blocks. You can enable it by customize CSS variables:
tabto indent lines in clode block, line numbers will be indented too bacause of OneNote’s limit. Don’t worry, numbers will be automatically corrected when hitting
Ctrl + Enterto exit editing.
When typing code line by line, some code may get the wrong syntax color, especially in multi-line comments. Don’t worry, when hitting
Ctrl + Enter to exit block, all the lines will be forced to highlight again. You can also trigger this by hitting
OneMark also supports CodeMirror themes.