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

FR: YAML Title Alias should Allow Users to Specify Key for Where to Store Title as a Reference #561

Closed
platon-ivanov opened this issue Dec 20, 2022 · 5 comments · Fixed by #1057
Assignees
Labels
resolution/update-made A change has been made that should resolve this issue or request rule suggestion Suggestion to add or edit a rule yaml YAML related issues or features

Comments

@platon-ivanov
Copy link

Problem description

Under YAML Title Alias there is the setting to "Use the YAML key linter-yaml-title-alias to help with filename and heading changes". Currently it creates the key that has identical contents to the title key, so every file has 2 identical keys.

Possible solution

Is it possible that instead of linter-yaml-title-alias it would use the title key?

@platon-ivanov platon-ivanov added the rule suggestion Suggestion to add or edit a rule label Dec 20, 2022
@pjkaufman
Copy link
Collaborator

I don't think I follow this request since you can turn off the use of the key linter-yaml-title-alias. Is there a reason you want to keep the value of the key when you are saying that you don't want that key?

@platon-ivanov
Copy link
Author

The purpose of linter-yaml-title-alias is to keep track of which alias to automatically change when the title of the document changes, which is very useful.

image

This key is, however, always identical to the YAML title key, also provided by the plugin. This makes it seem like linter-yaml-title-alias is redundant.

@pjkaufman
Copy link
Collaborator

That may be the case however they are two separate rules that allow for what you are referring to. Enabling both at the same time would then be able to cause unexpected results and would not be something that could be easily fixed. I don't see a problem with making the key used user defined as long as it is sensible that the user should know that using the two rules in conjunction can cause unexpected bugs.

Does that make sense or is this something that you think would be prone to bugs?

@platon-ivanov
Copy link
Author

Unfortunately I don't know the inner workings of the plugin, so it's difficult for me to judge how bug-prone any of the solutions would be. As a user, however, if there was a possibility to change the tag from linter-yaml-title-alias, I would try changing it to title, turning off the YAML title settings and hope that I would get an automatic title key in conjunction with an automated alias.

@pjkaufman pjkaufman added the yaml YAML related issues or features label Apr 24, 2023
@pjkaufman pjkaufman changed the title FR: YAML Title Alias could use the YAML title FR: YAML Title Alias should Allow Users to Specify Key for Where to Store Title as a Reference May 25, 2023
@pjkaufman pjkaufman self-assigned this Mar 22, 2024
@pjkaufman
Copy link
Collaborator

The change for this has been merged into master and should be in the next release. Please let us know if there are issues with it in either place. Thanks!

@pjkaufman pjkaufman added the resolution/update-made A change has been made that should resolve this issue or request label Mar 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
resolution/update-made A change has been made that should resolve this issue or request rule suggestion Suggestion to add or edit a rule yaml YAML related issues or features
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants