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.56k stars 390 forks source link

Inline field conflict with plugin Typst Renderer when use typst code block and It's heading markup #2379

Open xjxl520303 opened 2 weeks ago

xjxl520303 commented 2 weeks ago

What happened?

When use plugin Typst Renderere, write the follow code:

```typst
= Blockless
More text.

= Blocky
More text.


report ERROR:

Dataview (inline field 'Blockless
More text.

= Blocky
More text.'): Error: 
-- PARSING FAILED --------------------------------------------------

  1 | Blockless
> 2 | More text.
    | ^
  3 | 
  4 | = Blocky

Expected one of the following: 

'*' or '/' or '%', '+' or '-', '>=' or '<=' or '!=' or '=' or '>' or '<', 'and' or 'or'

### DQL

_No response_

### JS

_No response_

### Dataview Version

0.5.67

### Obsidian Version

1.6.3

### OS

Windows
holroy commented 2 weeks ago

Are you sure this is a Dataview bug, and not a bug because that plugin output some strange code triggering Dataview later on?

Without looking too much into this issue, I can't currently see why Dataview should try to interact with that text segment.

xjxl520303 commented 2 weeks ago

Are you sure this is a Dataview bug, and not a bug because that plugin output some strange code triggering Dataview later on?

Without looking too much into this issue, I can't currently see why Dataview should try to interact with that text segment.

Yes, you are right. the error is produced by Typst Renderer Plugin, I will report it to the author. Tky!

xjxl520303 commented 1 week ago

@holroy I created a new Obsidian vault and only download Dataview plugins, created a “Untitled” file, then add follow Typst code block:

```typst
= Test Heading
#lorem(20)


When use shortcut Ctrl + E to switch Reading View, It will trigger the bug:

![动画2](https://github.com/blacksmithgu/obsidian-dataview/assets/53321551/852c5cf7-3ab9-42f8-afb3-28daa22b06ff)