vscode-cfml icon indicating copy to clipboard operation
vscode-cfml copied to clipboard

Just-in-time array color coding issue

Open michaelalandawson opened this issue 2 years ago • 2 comments

The following, valid code results in unmatched coloring of the surrounding ## characters.

<cfloop array="#["Small","Medium","Large","Extra Large","Extra Extra Large"]#" index="thisOne">

image

Thanks!

michaelalandawson avatar Dec 13 '22 16:12 michaelalandawson

@michaelalandawson Try changing the outside quotes to single quotes. This one shows correct highlighting: <cfloop array='#["Small","Medium","Large","Extra Large","Extra Extra Large"]#' index="thisOne">

pczarn2 avatar Feb 01 '23 16:02 pczarn2

@pczarn2 that does work, although I have never used that syntax. Thanks.

While testing this, I may have uncovered another related issue:

This invalid code shows as valid. Notice the placement of the single and double quotes. They are not in pairs.

<cfloop array='#["Small","Medium","Large","Extra Large","Extra Extra Large"]#" index="thisOne'></cfloop>

image

michaelalandawson avatar Feb 02 '23 21:02 michaelalandawson