Support regex syntax highlight in live preview mode

Use case or problem

I save regex code snippets in my Obsidian notes, and it would be helpful if they displayed syntax highlight in live preview mode.

Proposed solution

Same implementation to how live preview mode features HTML and CSS syntax highlighting.

Current workaround (optional)

none

Related feature requests (optional)

none


(This is a copy of my feature request about wiki markup syntax highlighting, as it’s essentially the same issue - the language is supported in prism.js and reading mode, but not in live preview.)

4 Likes

@kazerniel, DYK which library provides it in Reading Mode? (Prism.JS)? [1]


  1. https://github.com/github-linguist/linguist/issues/7637#issue-3521333504 ↩︎

I think so. I did a search on the forum and most commenters work on the basis that it’s using prism.js for reading mode, and its own thing for editor and live preview mode.

Also came across this moderator thread covering all the syntax highlight request threads: Editor / Live Preview: Support Syntax Highlighting for Language XYZ

1 Like