Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Smart Bracket matching for different start tags with the same end tag does not work properly. #53134

Closed
ricardoferreirasilva opened this issue Jun 27, 2018 · 2 comments
Assignees
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

Comments

@ricardoferreirasilva
Copy link

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.

image

image

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.

@vscodebot vscodebot bot added editor editor-bracket-matching Editor brace matching labels Jun 27, 2018
@aeschli aeschli assigned rebornix and alexdima and unassigned aeschli Jun 28, 2018
@alexdima alexdima added the feature-request Request for new features or functionality label Jun 28, 2018
@sbatten
Copy link
Member

sbatten commented Sep 19, 2018

These appear to be the same symptoms as reported #26121 (comment)

@sbatten sbatten closed this as completed Sep 19, 2018
@sbatten sbatten added the *duplicate Issue identified as a duplicate of another issue(s) label Sep 19, 2018
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 3, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
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
Projects
None yet
Development

No branches or pull requests

5 participants