question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Bug: Linter fails to property delimit frontmatter tags separated by commas

See original GitHub issue

Describe the Bug

If a note’s frontmatter contains tags that are delimited by a comma without a trailing space, linter treats them as a single tag.

How to Reproduce

I have attached the data.json file. data.json.txt

Example 1

include in frontmatter YAML:

tags: tag1,tag2

Example 2

include in frontmatter YAML:

tags: tag1,tag2, tag3

Linting the file produces an incorrect result when the tags array is split into a multiline array:

Example 1 produces no result, even though it contains two tags.

Example 2 produces a note that now only contains 2 tags (“tag1,tag2” and “tag3”) even though before linting the note contained three tags.

Expected Behavior

Linter should parse the tags array exactly how Obsidian parses the tags array.

Example 1 should produce a multiline tags array with two tags. Example 2 should produce a multiline tags array with three tags.

Device

  • Desktop
  • [?] Mobile

Issue Analytics

  • State:closed
  • Created 10 months ago
  • Comments:7

github_iconTop GitHub Comments

1reaction
pjkaufmancommented, Nov 21, 2022

Looks like I would need to do something like the following:

const tags = 'tag1, tag2,tag3';

let elemnts = tags.split(',');
return elemnts .map(element => elemnts .trim());
0reactions
pjkaufmancommented, Nov 24, 2022

Good to hear. Hopefully it will go smoothly from here.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ox-hugo/ox-hugo.el at main · kaushalmodi/ox-hugo
"String used to separate elements in list variables. Examples are internal variables holding Hugo tags, categories and. keywords.
Read more >
sass-lint | Yarn - Package Manager
A Node-only Sass linter for both sass and scss syntax! Install. You can get sass-lint from NPM: Install globally
Read more >
Releases
This fixes problems with –webtex and markdown output, when display math starts or ends with a newline. --self-contained : issue warning rather than...
Read more >
Documentation Style Guide - GitLab Docs
Documentation Style Guide. This document defines the standards for GitLab documentation, including grammar, formatting, word use, and more.
Read more >
The Org Manual
Sometimes you might face a problem due to an error in your Emacs or Org mode setup. ... You can also add several...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found