Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiline tags should have two spaces before the hyphen #15

Open
Calorion opened this issue Sep 22, 2022 · 3 comments
Open

Multiline tags should have two spaces before the hyphen #15

Calorion opened this issue Sep 22, 2022 · 3 comments

Comments

@Calorion
Copy link

As shown at https://help.obsidian.md/How+to/Working+with+tags, YAML multiline tags should have two spaces before the hyphen, not one as this plugin uses.

Thanks for a very helpful plugin!

@bdrewery
Copy link

bdrewery commented Oct 24, 2022

When combing this plugin with https://github.com/platers/obsidian-linter it gets into a situation where both plugins are fighting. It puts 2 spaces, this puts 1 space, the linter hits an error.

It looks like it is a trivial fix to https://github.com/jmilldotdev/obsidian-frontmatter-tag-suggest/pull/6/files#diff-564c860307257bfac9176f554a35aa858c350a59d75c0dcd0a5d63a480805bd0R92

The fix would conflict with #8 (which does not fix this specific problem).

You can modify .obsidian/plugins/obsidian-frontmatter-tag-suggest/main.js to fix the problem locally. Just find the line near the end starting with -.

@macdrifter
Copy link

macdrifter commented Oct 29, 2022

I don't have a good argument one way or another but it does seem like there is a conflict within the Obsidian spec. The more generic definition for YAML front matter shows that no spaces should precede the first bulleted field values: https://help.obsidian.md/Advanced+topics/YAML+front+matter

Unless tags are a very special kind of YAML property in Obsidian then I think it should follow the more generic specification.

I think I prefer to have no spaces before the dash to avoid confusion while visually inspecting a list (one vs. two spaces is harder to discern than no spaces).

[EDIT]: Looking at the YAML specification it seems that any of these is acceptable

@HighLibrarian
Copy link

@Calorion, on line 124 in main.js i just added an extra space before the -'; and that seems to add the extra space.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants