jcberquist / commandbox-cfformat

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

Whitespace lost between interpolated expressions in cfoutput #117

Closed sbleon closed 3 years ago

sbleon commented 3 years ago

Input:

<cfcomponent>
  <cffunction name='foo'>
    <cfoutput>
      this #Now()# #Now()# collapses the space between them
    </cfoutput>
  </cffunction>
</cfcomponent>

Output:

<cfcomponent>
  <cffunction name='foo'>
    <cfoutput>
      this #Now()##Now()# collapses the space between them
    </cfoutput>
  </cffunction>
</cfcomponent>

We need the space between the two interpolated expressions to be preserved.

Config:

{
  "alignment.consecutive.assignments": false,
  "alignment.consecutive.params": false,
  "alignment.consecutive.properties": false,
  "array.empty_padding": false,
  "array.multiline.comma_dangle": false,
  "array.multiline.element_count": 1,
  "array.multiline.leading_comma": false,
  "array.multiline.leading_comma.padding": true,
  "array.multiline.min_length": 80,
  "array.padding": false,
  "binary_operators.padding": true,
  "brackets.padding": false,
  "comment.asterisks": "align",
  "for_loop_semicolons.padding": true,
  "function_anonymous.empty_padding": false,
  "function_anonymous.group_to_block_spacing": "spaced",
  "function_anonymous.multiline.comma_dangle": false,
  "function_anonymous.multiline.element_count": 1,
  "function_anonymous.multiline.leading_comma": false,
  "function_anonymous.multiline.leading_comma.padding": true,
  "function_anonymous.multiline.min_length": 80,
  "function_anonymous.padding": false,
  "function_anonymous.spacing_to_group": false,
  "function_call.casing.builtin": "pascal",
  "function_call.casing.userdefined": "camel",
  "function_call.empty_padding": false,
  "function_call.multiline.comma_dangle": false,
  "function_call.multiline.element_count": 1,
  "function_call.multiline.leading_comma": false,
  "function_call.multiline.leading_comma.padding": true,
  "function_call.multiline.min_length": 80,
  "function_call.padding": false,
  "function_declaration.empty_padding": false,
  "function_declaration.group_to_block_spacing": "spaced",
  "function_declaration.multiline.comma_dangle": false,
  "function_declaration.multiline.element_count": 1,
  "function_declaration.multiline.leading_comma": false,
  "function_declaration.multiline.leading_comma.padding": true,
  "function_declaration.multiline.min_length": 80,
  "function_declaration.padding": false,
  "function_declaration.spacing_to_group": false,
  "indent_size": 2,
  "keywords.block_to_keyword_spacing": "spaced",
  "keywords.empty_group_spacing": false,
  "keywords.group_to_block_spacing": "compact",
  "keywords.padding_inside_group": true,
  "keywords.spacing_to_block": "spaced",
  "keywords.spacing_to_group": false,
  "max_columns": 120,
  "metadata.multiline.element_count": 1,
  "metadata.multiline.min_length": 80,
  "method_call.chain.multiline": 3,
  "newline": "os",
  "parentheses.padding": false,
  "property.multiline.element_count": 1,
  "property.multiline.min_length": 80,
  "strings.attributes.quote": "single",
  "strings.convertNestedQuotes": false,
  "strings.quote": "single",
  "struct.empty_padding": false,
  "struct.multiline.comma_dangle": false,
  "struct.multiline.element_count": 1,
  "struct.multiline.leading_comma": false,
  "struct.multiline.leading_comma.padding": true,
  "struct.multiline.min_length": 80,
  "struct.padding": true,
  "struct.quote_keys": false,
  "struct.separator": ": ",
  "tab_indent": false,
  "tags.lowercase": true
}
sbleon commented 3 years ago

Workaround: put a line break in between the two interpolated expressions.

jcberquist commented 3 years ago

Thanks! This should be fixed in v0.16.3.

sbleon commented 3 years ago

Thank you!

On Wed, Sep 1, 2021 at 4:42 PM John Berquist @.***> wrote:

Thanks! This should be fixed in v0.16.3.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jcberquist/commandbox-cfformat/issues/117#issuecomment-910728207, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABQQN3VX6I5ADQPB2GNVOTT72F4DANCNFSM5DGU6FCQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.