cm-editor-syntax-highlight-obsidian
cm-editor-syntax-highlight-obsidian copied to clipboard
Request: be more flexible for language tags in Python
I noticed that the editor doesn't do highlighting unless the full name of the language is used:
Both render correctly in preview mode:
Other languages don't seem to have this problem- Typescript code is highlighted in the editor for both ts
and typescript
. Python seems to be catching an odd case here.
A temporary solution is to add alias: ["py"]
in <vault>/.obsidian/plugins/cm-editor-syntax-highlight-obsidian/main.js
line 174:
{name: "Python", mime: "text/x-python", mode: "python", ext: ["BUILD", "bzl", "py", "pyw"], alias: ["py"], file: /^(BUCK|BUILD)$/},
The same thing with shell
and bash
working, but sh
isn't.
For me, sh
works in edit mode but not in preview mode.
The same for me.
It would be nice to have sh
as an alias for bash
and shell
.