dud icon indicating copy to clipboard operation
dud copied to clipboard

Don't mess with yaml formatting while checksumming

Open indigoviolet opened this issue 1 year ago • 1 comments

Is your feature request related to a problem? Please describe. If I add comments or nicely format my command for readability, it is lost upon dud commit

Describe the solution you'd like Maintain the formatting through dud commit

indigoviolet avatar Aug 30 '23 20:08 indigoviolet

I agree that this is annoying. Unfortunately solving it is non-trivial. Best case scenario, I upgrade to yaml.v3 which allegedly supports this, albeit with a big caveat:

It's worth noting that although Node offers access into details such as line numbers, colums (sp), and comments, the content when re-encoded will not have its original textual representation preserved. An effort is made to render the data plesantly (sp), and to preserve comments near the data they describe, though.

Worst case scenario, I roll my own "checksum injector", which I don't think would be worth the burden.

I think trying yaml.v3 makes sense as a next step. Thanks for opening the issue!

kevin-hanselman avatar Aug 30 '23 23:08 kevin-hanselman

For now I am closing this as unplanned for the reasons I lay out above. I am not ruling it out entirely, though! If someone thinks there's a sensible way to do this, please let me know in this thread.

kevin-hanselman avatar Jun 29 '24 14:06 kevin-hanselman