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

Fix: yaml-title-alias Does Not Respect Multiline Format when Initially Empty with Preserve Existing Format Used #1089

Merged
merged 2 commits into from
May 8, 2024

Conversation

pjkaufman
Copy link
Collaborator

Fixes #1085

There was a reported issue where yaml-title-alias did not seem to be working when the aliases section was empty, default aliases section style was multiline, and the setting for preserving the style of the aliases section was set to true. The fix was to make sure that we assume that [] is not tied to any one type. So if that is the value for aliases and the default style for aliases is multiline, we will assume it is meant to be a multiline array.

Changes Made:

  • Added a UT for the scenario in question
  • Made sure to only consider the aliases section to be single line if there are no new lines in the values and the aliases value is not a blank yaml array with a default aliases section style of multiline

pjkaufman and others added 2 commits May 7, 2024 20:21
…s when yaml title alias is used with preserve existing format and the current value is empty
@pjkaufman pjkaufman added bug Something isn't working yaml YAML related issues or features labels May 8, 2024
@pjkaufman pjkaufman self-assigned this May 8, 2024
@pjkaufman pjkaufman merged commit 6b019cf into platers:master May 8, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working yaml YAML related issues or features
Projects
None yet
1 participant