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.84k stars 405 forks source link

Inline QUERY displays correctly in live preview but not in reading view IF there is an inline FIELD declared in the same block as the inline query. #2160

Open Joursach opened 9 months ago

Joursach commented 9 months ago

What happened?

The potential bug

An inline query which is in the same block as a declared inline field always displays correctly while in live preview. However, when in reading view, it just displays the underlying line of code. In the following example, I declare the inline field f::[[Necessity and sufficiency]] in the same block as the inline query =[[Mathematical statements#True mathematical statements|theorem]]: image and it displays as such in reading view: image However, when I remove the field declaration "f::" from before the link "[[Necessity and sufficiency]]", it displays correctly in reading view: image

It could be an intended functionality, but I thought it is worth pointing it out, since it seems to work in live preview. It would be useful if it would work in reading view as well.

How can this functionality be useful?

Inline queries don't show up in the graph view and, therefore, can be used to provide ease of navigation, additional context, etc., without unnecessarily polluting the graph and, thus, keeping the visualisation of the underlying logic of a note clean. Sometimes, it may be useful to also declare an inline field in the same block for whatever reason.

DQL

No response

JS

No response

Dataview Version

0.5.64

Obsidian Version

1.4.16

OS

Windows

LynetteCullens commented 2 months ago

Disabling LaTeX-like Theorem & Equation Referencer for Obsidian fixes it for me.

  1. Install LaTeX-like Theorem & Equation Referencer for Obsidian
  2. Install Meta Bind or Dataview
  3. Input:
    > [! definition] `$= dv.page('Plastisol')['title']`
    > 
    > `$= dv.page('Plastisol')['definition']`
    > 
    > ^definition

    Reading View Render: image

Live Preview Render: image

RyotaUshio/obsidian-latex-theorem-equation-referencer#217