Dataview list within a table has additional empty lines between each item

Steps to reproduce

When dataview plugin is active and javascript queries enabled, enter the following text in a new note:
“”"
Minimal example:

```dataviewjs
let tableRows = [];
const pagesWithContent = [{page: "1", content: "Hello"}, {page: "2", content: "World\n* List entry\n  * sublist entry\n  * another sublist entry\n* Another list entry"}] 
for (const { page, content } of pagesWithContent) {
    tableRows.push([page, content]);
};

dv.table(["Page", "Paragraphs"], tableRows);
```

“”"

Did you follow the troubleshooting guide? [Y/N]

Y

Expected result

As in the picture below, but without all the empty (one or two) lines between items

Actual result

Environment

SYSTEM INFO:
Obsidian version: v1.5.12
Installer version: v1.5.12
Operating system: #35-Ubuntu SMP PREEMPT_DYNAMIC Fri Apr 26 11:23:57 UTC 2024 6.5.0-35-generic
Login status: not logged in
Insider build toggle: off
Live preview: on
Base theme: adapt to system
Community theme: none
Snippets enabled: 0
Restricted mode: off
Plugins installed: 1
Plugins enabled: 1
1: Dataview v0.5.66

RECOMMENDATIONS:
Community plugins: for bugs, please first try updating all your plugins to latest. If still not fixed, please try to make the issue happen in the Sandbox Vault or disable community plugins.


Additional information

The thing I want to achieve: Dataviewjs: List all paragraphs in my daily notes that contain link [[JohnDoe]]

The text between the “”" should start with three backticks and dataviewjs, and end with three backticks.

  • We only consider bugs that are reproducible in the sandbox vault or a vault with no third-party plugins/no css snippets/default theme.

moved to the help section.

You can embed code between triple backticks. You can embed triple backticks with 4 backticks. Or triple tidles ~~~.

````
```dataviewjs
code here
```
````

(I took the liberty of editing your post.)

Thanks for moving. I was confused, because you can select bug report and then category dataview. Since I did reproduce it in the sandbox vault, I thought it falls under “bugs that are reproducible in the sandbox vault or a vault with no third-party plugins”.

Since this issue got removed from the bug report category, I created a bug report at github: Bug report: Dataview list within a table has additional empty lines between each item · Issue #2360 · blacksmithgu/obsidian-dataview · GitHub

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.