jcberquist / commandbox-cfformat

A CommandBox module for formatting CFML component files.
MIT License
22 stars 10 forks source link

Component attribute spacing around = character #111

Closed bockensm closed 2 years ago

bockensm commented 3 years ago

Consider the following code:

component extends = "base.component" output = false {
}

There do not appear to be any settings that would allow me to specify whether or not I want spaces around the equals characters. At the moment, the spaces are automatically removed regardless of my preferences.

jcberquist commented 3 years ago

At the moment, these are formatted as tag attributes. Are you looking for a global setting that affects spacing in tag attributes, or something that is specific to component attributes? I would prefer to add something general.

bockensm commented 3 years ago

I would be OK with one setting that hits component attributes as well as property and param.

jcberquist commented 2 years ago

I have added some new settings in v0.17.0: metadata.key_value.padding, property.key_value.padding, and param.key_value.padding. These are defaulted to false, but you can set them to true to get the padding you describe above. I did it this way with these settings to keep things in line with what was already present in the settings.