You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wanted a dataviewjs table to list and sort all tasks, that are incomplete and group by tag.
I used ChatGPT to whip something up and it generated the following:
let tagCounts = {};
// Loop through all pages in the vault
for (let page of dv.pages()) {
if (page.file.tasks) {
for (let task of page.file.tasks) {
// Only consider not completed tasks
if (!task.completed && task.tags) {
for (let tag of task.tags) {
tagCounts[tag] = (tagCounts[tag] || 0) + 1;
}
}
}
}
}
// Convert the object to an array of [tag, count] pairs and sort by count (descending)
let sortedTags = Object.entries(tagCounts).sort((a, b) => b[1] - a[1]);
// Render the results as a table
dv.table(["Tag", "Count"], sortedTags);
The problem I have is that I had a link in a markdown file that had #inbox in the URL like this:
What happened?
Description
I have a number of tasks with tags
I wanted a dataviewjs table to list and sort all tasks, that are incomplete and group by tag.
I used ChatGPT to whip something up and it generated the following:
The problem I have is that I had a link in a markdown file that had
#inbox
in the URL like this:Looking at the code ChatGPT generated, it doesn't seem incorrect. I can verify via
console.log
that thedv
object(s) are picking up the above#inbox
.How to reproduce
Expected Result
Dataviewjs doesn't pick it up ✅
Obsidian Search doesn't pick it up ✅
Actual Result
Dataviewjs picks the tag up ❌
Obsidian Search doesn't pick it up ✅
DQL
No response
JS
No response
Dataview Version
0.5.66
Obsidian Version
1.7.7
OS
MacOS
The text was updated successfully, but these errors were encountered: