Highlighting of inline fields takes place in inline code
Describe the bug Writing an inline field inside backticks (for a piece of inline code) still results in inline code being highlighted in the preview view.
To Reproduce Steps to reproduce the behavior:
- Install and enable
dataview. - Type the following text
`[due:: ]`, `[created:: ]`, `[completion:: ]`
- Swap to preview mode.
- The inline fields are highlighted specially, rather than showing the raw code for them.
Expected behavior Fields inside backticks should not be highlighted specially (as happens for code blocks).
Desktop:
- OS: macOS 12.0.1
- Obsidian Version 0.12.19
- Dataview Version 0.4.20
I just ran into this same problem with Rust code like this in a code block:
`thing: Box<dyn Trait> = Box::new(Thing::new());`
I was super confused why a chunk of my code was disappeared since now my code reads thing: Box<dyn Trait> = Box::new new();. While I was messing around I also ended up with some really weird behavior having the 3 backticks on the same line as the code: I couldn't "expand" the field any more.
From my perspective it'd be nice to have Dataview ignore text inside code blocks for fields, or have a toggle to do so since :: shows up fairly frequently for me.
Edit: I originally thought I was seeing this inside multi-line code blocks, but I had some weird formatting errors that caused strange behavior. Now I'm only seeing this issue inside the inline code blocks.
OS: MacOS 14.2.1 Obsidian Version 1.5.3 Dataview Version 0.5.64