obsidian-dataview: Inline fields not rendered correctly in reading view

What happened?

If multiple of the same inline fields are separated by a single empty line, they are rendered incorrectly. To see this behavior, you must enable the “Enable Inline Field Highlighting in Reading View” option. Simple example:

(note::Note 1)
(note::Note 2)
(note::Note 3)

Can someone confirm this bug?

DQL

No response

JS

No response

Dataview Version

0.5.64

Obsidian Version

1.5.3

OS

Windows

About this issue

  • Original URL
  • State: open
  • Created 5 months ago
  • Comments: 15 (10 by maintainers)

Commits related to this issue

Most upvoted comments

@holroy Thank you for letting me know, and I’m sorry if my code introduced this bug. I will look into this within a few days.

We need to consolidate what works and what doesn’t work, so could some of you please test the following markdown and report back when values are collated together or not?


forumUrl:: http://forum.obsidian.md/t//71031
githubUrl:: https://github.com/blacksmithgu/obsidian-dataview/issues/2216

## Unfixed?

### Multiple fields in list

Is the first line repeated in all four lines?

- [ ] (title:: "*The Lord Of The Rings Trilogy*"), (author:: "J.R.R. Tolkien")
- [ ] (title:: "*The Hitchhiker's Guide To The Galaxy*"), (author:: "Douglas Adams")
- [ ] (title:: "*Ender's Game*"), (author:: "Orson Scott Card")
- [ ] (title:: *The Dune Chronicles*), (author:: Frank Herbert)

### Inline fields with multiple values

Are these showing just one value in _live preview_ ?

[multiValueInt:: 1, 2]

[multiValueText:: "x", "y"]

## Fixed ?

Are the following OK in both _live preview_ and _reading mode_?

### Body

(body:: Body 1)
(body:: Body 2)
(body:: Body 3)

### Task

- [ ] (task:: Task 1)
- [ ] (task:: Task 2)
- [ ] (task:: Task 3)

### List multiple square brackets

- [duped:: a] and [not-duped:: a2]
- [duped:: b] and [duped-not:: b2]

### List multiple round brackets

- (duped:: a) and [not-duped:: a2]
- (duped:: b) and [duped-not:: b2]

When running within the test-vault with only dataview running on the code from 0.5.66, I only get errors related to the following two cases:

Multiple fields in list - Reading mode

image

Multiple values in inline fields - Live preview

image


Could you please verify that you see the same behaviour, and please also state which version of Obsidian and which operating system you’re using. This test I’ve conducted on Win11 in Obsidian 1.5.11 (with 1.5.8 installer).