Comments (3)
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.
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.
A possible implementation for this is to have options on the desired output format after parsing out the #
. Workflow would be:
- Users type out their tags as suggested:
tags: #tag1 #tag2
- 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)
- FR: Don't change cursor position on lint, and scroll to current line after linting if moved HOT 5
- Bug: Issues with No Bare URLs rule HOT 5
- Some linting rules disrupts header fold states HOT 5
- Question: Possible to Save Current Time When Using Template to Create Note HOT 3
- FR: Add option to skip Liquid tags and content wrapped by them HOT 2
- Bug: forbidden character combinations while copy & pasting the text of a website to a note HOT 4
- FR: Add option to save YAML timestamps in UTC
- FR: Keep Title if It Already Exists HOT 6
- FR: Ignore hyphens in "Space between Chinese Japanese or Korean and English or numbers" HOT 11
- Bug: MisspellingToCorrection not check correctly if my default language in OS settings is English HOT 3
- Bug: `Empty Lines Around Code Fences` can cause problems with nested callouts HOT 1
- FR: Don't auto-complete acronyms
- Bug: Created date gets updated to a different timezone HOT 19
- Question: How do I increase the number of new lines to two before a heading? HOT 2
- Bug: YAML Key Sort option removes multi-line content after literal operator `|` HOT 4
- Bug: tildes in URLs cause the URL to be broken HOT 1
- Bug: "Preserve existing aliases section style" should check Linter's array section style setting to avoid >1 lint HOT 6
- Bug: Indentations for math block removed from callouts or block quotes HOT 5
- Bug: auto “created” and “modified” date time in custom format. HOT 3
- FR: Lint selected files via the Files tab (similar to "Lint folder")
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from obsidian-linter.