-
-
Notifications
You must be signed in to change notification settings - Fork 19
Description
Is your feature request related to a problem? Please describe.
First of all, thank you everyone involved in adding syntax highlighting for inline code (#10). I have been using the feature for some time now and it works great!
However, I noticed that when editing inline code that is highlighted (via adding a "language indicator" in the form of {LANG}), the inline code alternates between showing the source as it is, and the highlighted code without the language indicator, according to whether the text cursor is actively editing that inline code or not.
This behavior is normal and desirable in live preview mode, but perhaps out of place in source mode (where the source code is perhaps expected "as is".) As someone who mainly edit only in source mode, having the whole paragraph often reflowing back and forth is a bit distracting.
Describe the solution you'd like
I think the most straightforward way to display highlighted inline code in source mode is to always show the language indicator (perhaps without any highlighting needed), and the "core" code, preferably syntax highlighted.
For example, in source mode, the inline code `{py} print('Hello World')` should always show the {py} part and preferably highlight the print ('Hellow World') part.
This choice could be optional, for people who prefer the tidier view of this version of the plugin, even in source mode.
Additional context
None, except for an apology for following up a solved problem with another request, and a thank you very much in advance for considering this feature request :)