Skip to content

Spaces between quote and value in CFML attributes in real time product causing code errors - needs to not happen! #197

@rlsmithCSI

Description

@rlsmithCSI

Unibeautify Playground link

Language: ColdFusion

Config:

{
  "ColdFusion": {
    "indent_comments": true,
    "indent_style": "tab",
    "indent_size": 1,
    "max_preserve_newlines": 1,
    "quotes": "none",
    "wrap_line_length": 60,
    "force_indentation": false,
    "beautifiers": [
      "Pretty Diff"
    ]
  }
}

Input:

	<cfform name="frm_coupon_list" method="post" action="/admin/coupons/">
      <table width="100%" cellspacing="1" cellpadding="2" border="0" class="hover row-border stripe cell-border" id="maintbl">
        <thead>
          <tr>
            <td>
              Name</td>
            <td>
              Code</td>
            <td>
              Expiration Date</td>
          </tr>
        </thead>
 <tbody><tr><td>hello</td><td>goodbye</td></tr></tbody></table></cfform>
   

Output: The example version is correct; that is, it is NOT putting a space in, but the actual product in VSCode does (e.g. name="frm_coupon_list" comes out as name=" frm_coupon_list ")

<cfform
	name="frm_coupon_list"
	method="post"
	action="/admin/coupons/">
	<table
		width="100%"
		cellspacing="1"
		cellpadding="2"
		border="0"
		class="hover row-border stripe cell-border"
		id="maintbl">
		<thead>
			<tr>
				<td>
					Name</td>
				<td>
					Code</td>
				<td>
					Expiration Date</td>
			</tr>
		</thead>
		<tbody>
			<tr>
				<td>hello</td>
				<td>goodbye</td>
			</tr>
		</tbody>
	</table>
</cfform>

Expected behavior:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions