-
-
Notifications
You must be signed in to change notification settings - Fork 132
Description
I am looking to meet some user expectations/preferences in how flow collections are rendered in YAML that we generate. Specifically, I'd like to avoid the single-space padding that is currently hard-coded around flow collection items:
yaml/src/stringify/stringifyCollection.ts
Line 158 in 8e7e57f
str = `${start} ${lines.join(' ')} ${end}` |
Would you be open to adding a node-level formatting option (much like spaceBefore
, etc) to control the size of this padding?
(FWIW, I've looked at using CSTs, but the prospect of building up documents using them vs. the much simpler AST is daunting. Note that these documents are being generated, not parsed from some existing source and modified; if that were the case, then using the CST facilities would be a snap. I can imagine a stringify approach that first distilled an AST to some default CST tree, which one could then modify as desired, but ofc that's not how things are set up. 😄 )