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

Braces highlight mismatch #83

Open
kjhf opened this issue Sep 14, 2023 · 2 comments
Open

Braces highlight mismatch #83

kjhf opened this issue Sep 14, 2023 · 2 comments
Labels
bug Something isn't working syntax the issue about wikitext syntax

Comments

@kjhf
Copy link

kjhf commented Sep 14, 2023

Hello, thank you for your useful extension.
In more complicated template cases, braces can be mismatched. For example

{{#if:{{{param|}}}|{{{param}}}|{{ATemplate|Template arg}}}}

@kjhf
Copy link
Author

kjhf commented Sep 14, 2023

image

@Frederisk
Copy link
Owner

Frederisk commented Sep 15, 2023

This matter is more complicated, but I may not be able to solve it in a short time. VSCode's bracket matching currently does not allow the use of complex regexps to adjust. And in fact, TextMate also leads to the need to write some inefficient and difficult-to-maintain code (mainly regexp) to maintain this problem.

There are of course many other reasons, such as Parsoid's strange parsing strategy and the poor syntax of wikitext itself.

In any case, I am considering introducing LSP support, aka. Language Server Extension to solve this problem. But it’s not easy, and it may take me quite some time to focus on this issue.

As a mitigation measure, if you don't mind, you can insert comments or spaces that do not affect the semantics of the source code to alleviate this problem.

@Frederisk Frederisk added bug Something isn't working syntax the issue about wikitext syntax labels Nov 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working syntax the issue about wikitext syntax
Projects
None yet
Development

No branches or pull requests

2 participants