obsidian-dataview icon indicating copy to clipboard operation
obsidian-dataview copied to clipboard

codeblock with "=" causes a PARSING FAILED

Open baddate opened this issue 1 year ago • 2 comments

What happened?

typing "=" in a md file causes a parsing error:

source image

result: image

reproduce:

  1. type `=` in anywhere

DQL

No response

JS

No response

Dataview Version

0.5.66

Obsidian Version

1.5.12

OS

Windows

baddate avatar Apr 03 '24 02:04 baddate

Would any fix be available to skip '=' if the code starts with an equal sign?

fcalazans avatar Apr 06 '24 22:04 fcalazans

The sequence of `= is the default way to start inline query, so you could change the prefix in Settings > Dataview > Inline Query Prefix.

Another option is to use <code>=</code> to display the equal sign as just the equal sign in a monospaced font. Yet another option is to insert another character in between the first backtick and the equal sign. If you can live with that, one option could be ` =`, another variant could be to insert a zero-width space at the same position.

I'm not sure on the exact details, but I do believe it's hard for Dataview to have this as a prefix and still be able to display only the equal sign if no other text is present.

holroy avatar Apr 09 '24 18:04 holroy