damiankorcz / Prism-Theme

A Comprehensive, Highly-Customisable and Elegant Light/Dark Theme for Obsidian.md
https://www.buymeacoffee.com/DamianKorcz
MIT License
369 stars 13 forks source link

Syntax highlighting does not seem to work in reading mode #142

Closed kamransoomro84 closed 11 months ago

kamransoomro84 commented 11 months ago

Describe the bug The heading says it all basically. I have a python code block. The syntax highlighting works in the editing view but not in the reading view. See screenshot below:

CleanShot 2023-09-13 at 10 29 22

To Reproduce Create a simple python code block and ensure you are in Reading view.

Expected behavior You should be able to see syntax highlighting, like in editing view.

CleanShot 2023-09-13 at 10 30 30

Screenshots Please see above.

Setup Information

Additional context N/A

damiankorcz commented 11 months ago

This issue isn't directly related to the Prism theme. Both view modes use different APIs for syntax highlighting (The Live Preview uses CodeMirror and the Reading mode uses PrismJS) hence the inconsistency. This issue is prevelant in other themes too.

I would suggest looking through the Obsidian Forums and seeing if there are reports of this issue and if not creating your own. There's nothing I can do to mitigate this.

kamransoomro84 commented 11 months ago

Ok thanks.