Smart Bracket matching for different start tags with the same end tag does not work properly. #53134
Labels
*duplicate
Issue identified as a duplicate of another issue(s)
editor-bracket-matching
Editor brace matching
feature-request
Request for new features or functionality
Greetings,
I have been working on an language extension for Visual Studio Code and have encountered the following issue. Before explaining I think it is important to note that in my language it is possible to have different tags that increase the indentention level and that these different tags are closed by a common tag (thus lowering indentation).
For example: CREATE ...... ONRENDER.....END.....END
We can see here two opening tags (CREATE and RENDER) which are both closed by the END tag.
In order to implement corresponding tag highlighting I implemented the following brackets:
"brackets": [ ["{", "}"], ["[", "]"], ["(", ")"], ["onrender","end"], ["create","end"], ["if","endif"], ["while","endwhile"], ["for","next"], ],
However when we take a look at the result we can that while the ONRENDER tag matches correctly with its END tag, the CREATE tag matches with the same END tag while it should actually match with the second.
I do not know if this is supposed behaviour or a bug. As a user I would expect that vscode should not match two indentation start tags to the same indentation close tag.
Thanks for your time reading this,
Best regards.
The text was updated successfully, but these errors were encountered: