You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi @djgoku I apologize for the delay in addressing the issue. I haven't had time to look at this project for the last month, but I finally had some time to check today.
This is a really funky edge case with the go-yaml libraries way of parsing comments. I know what the bug is, but I don't have a fix for it right now.
What's happening here is that when the comment is at the end of the array (in YAML syntax grammar called a "mapping block") it does not get rendered properly. I don't know if this is as a hack or for some genuine grammar reason, but when the parser encounters a foot comment for a mapping block like this, it forces it to be the foot comment of the key of the last item in the mapping block, so in this case the id in the last non-comment item. That's why it gets aligned like this. Under some scenarios, it might get mistakenly scanned as the foot comment for hooks and get moved back a tab too.
I couldn't figure out how to fix it while working yesterday but I will try to fix it soon.
Hi @chuckwondo, sorry I haven't. Most of these problems with the underlying yaml formatting library end up being so time consuming that I can't fit them into the time I have for this project. (See this discussion post for more details)
I can try and take another look next block of yamlfmt time I have to see if I can come up with a fix.
Originally posted here: #74 (comment)
input yaml:
output yaml:
The text was updated successfully, but these errors were encountered: