I am quite excited I finally found a markdown editor that supports power query!
Now I’m just a bit confused as to why the colours in the code block have nothing to do with the native power query colours. Is there a way to update them somehow?
The syntax highlighting in reading view comes from PrismJS (CodeMirror for Live Preview), so I’d think it’s whatever PrismJS have decided for that code language. There are a few plugins (2?) dealing with syntax highlighting in the community gallery, but they look quite old and may not work anymore.
Hi @ariehen,
Thanks for the prompt reply!
I understand that PrismJS comes in different themes, is it possible to try the other themes or add my own?
Cheers
PrismJS is a library Obsidian uses and not a theme. Not to be confused with the Prism theme. Some community themes do change the syntax highlighting on their own.
I’m not sure how you would go about changing the PrismJS highlighting for power query labeled code blocks only, but there are variables in the theme CSS that can alter all code blocks. You could try changing some of these:
If all your power query code is in one note, you could look into cssclasses to alter only that note’s code blocks. For example, changing the above CSS to:
body .pq {
/* styles here */
}
and at line one (in the YAML) of the note you want to change,