Obsidian has some missing languages, but this plugin does not, for example: Forth. Is it possible to override Obsidian's default syntax highlighting in Preview mode with your plugin?
Or if you know how to add Forth to Obsidian's syntax highlighting, that would be much appreciated. I think they use CodeMirror, but CodeMirror supports Forth though.
The text was updated successfully, but these errors were encountered:
odiferousmint
changed the title
Syntax highlighting does NOT work in Preview mode for some languages
Could we make syntax highlighting work for Preview mode, too?
Nov 20, 2020
This plugin only affects the syntax highlighting in the editor (which does use CodeMirror)
The preview uses a different thing: prism.js.
CodeMirror is great for editing, but in the preview where editing is not required, prism is much lighter (at least I assume that's why it uses something different). There could be the possibility of adding more modes to prism, but not something I've looked into.
If you knew what you were doing you could probably write one and submit a PR to prism (then ask Licat to pull the latest 😉). But defining syntax highlighting looks like too much regex for my brain to handle (plus I'm not familiar with Forth)
Hello.
Obsidian has some missing languages, but this plugin does not, for example: Forth. Is it possible to override Obsidian's default syntax highlighting in Preview mode with your plugin?
Or if you know how to add Forth to Obsidian's syntax highlighting, that would be much appreciated. I think they use CodeMirror, but CodeMirror supports Forth though.
The text was updated successfully, but these errors were encountered: