Giter Club home page Giter Club logo

Comments (3)

JeppeKlitgaard avatar JeppeKlitgaard commented on May 26, 2024 2

I also use this type of YAML list to do tags, and I think fixing this would be fantastic!

Ideally it would maintain the style used by the user, essentially just replacing the hashtags with nothing

from obsidian-linter.

theopavlove avatar theopavlove commented on May 26, 2024 1

The rule "Format Tags in YAML" doesn't handle tags in the front matter formatted like

Tags:

  • #foo
  • #Bar

Applying the linter does nothing. The expected results were

Tags:

  • foo
  • Bar

My use case for this is that I find this style of lists in YAML to be more legible and easier to edit or remove a tag. I suspect the reason I start with the # is similar to others, we want auto-complete help when assigning tags.

To be more precise, the following case does not work as expected:

---
tags:
- #tag1
- #tag2
---

The rule format-tags-in-yaml ignores the hashes as the original regex parses only a single string.

from obsidian-linter.

neldeles avatar neldeles commented on May 26, 2024

A possible implementation for this is to have options on the desired output format after parsing out the #. Workflow would be:

  1. Users type out their tags as suggested: tags: #tag1 #tag2
  2. On save it's formatted based on the format output setting chosen by user i.e. bullet points, array

I myself prefer keeping my tags in an array e.g. tags: [ tag1, tag2 ] so a feature like this would be great.

from obsidian-linter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.