blacksmithgu / obsidian-dataview

A data index and query language over Markdown files, for https://obsidian.md/.
https://blacksmithgu.github.io/obsidian-dataview/
MIT License
6.97k stars 410 forks source link

Backslash escape ends inline Queries in edit mode. #2371

Open mWisbar opened 4 months ago

mWisbar commented 4 months ago

What happened?

The regexreplace demands some characters to be escaped, for example in this line that extracts the text of a link: =regexreplace(regexreplace(string(internal_link), "\]\]", ""), "\[\[.*\|", "")

This works fine in display mode, however in edit mode, the backslash somehow ends the function, making it useless for regex vstrings with special characters:

Dataview (inline field 'regexreplace(regexreplace(string(this.exp_ID.project_ID), "'): Error: 
-- PARSING FAILED --------------------------------------------------

Got the end of the input

Expected:

string
]\]", ""), "\[\[.*\|", "")

I remember that this worked in edit mode during a previous version, however I am unsure which version it has been exactly.

DQL

No response

JS

No response

Dataview Version

0.5.66

Obsidian Version

1.6.3

OS

Windows

mWisbar commented 3 months ago

Fixed in V1.6