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

Improve Qute self-closing tags support #596

Open
fbricon opened this issue Mar 17, 2023 · 4 comments
Open

Improve Qute self-closing tags support #596

fbricon opened this issue Mar 17, 2023 · 4 comments
Assignees
Labels
enhancement New feature or request qute

Comments

@fbricon
Copy link
Collaborator

fbricon commented Mar 17, 2023

In a Qute template, if you start typing {#inclu and select completion, the following is inserted:

{#include template}

{/include} 

It'd be nice to remove the closing tag if the user adds the self-closing slash after the template name ({#include template /}), while the tag content is empty, akin to self-closing tag behavior in vscode-xml.

There might be other specific tags where auto-close might be relevant (#insert? #fragment? ...), @mkouba or @FroMage may have some ideas

@fbricon fbricon added enhancement New feature or request qute labels Mar 17, 2023
@FroMage
Copy link

FroMage commented Mar 20, 2023

That's a good idea, and valid for every tag.

@fbricon
Copy link
Collaborator Author

fbricon commented Mar 20, 2023

@FroMage I doubt this would be wanted in the case of control flow statements ({#if}, {#for} ...)

@FroMage
Copy link

FroMage commented Mar 20, 2023

Well, those always have bodies. But all the tags that have a / to close them without body need to have their closing tag removed.

@angelozerr
Copy link
Contributor

@FroMage I doubt this would be wanted in the case of control flow statements ({#if}, {#for} ...)

Indeed, we ned to check if section tags has nested content (for user tag the html file includes {nested-content, we use already this information for completion with user tag)

I think it would be nice too to process the remove of /

When we remove this character, it should generate the end tag section.

@angelozerr angelozerr self-assigned this Mar 21, 2023
angelozerr pushed a commit to angelozerr/vscode-quarkus that referenced this issue Mar 24, 2023
Fixes redhat-developer#596

Signed-off-by: azerr <azerr@redhat.com>
angelozerr pushed a commit to angelozerr/vscode-quarkus that referenced this issue Jul 21, 2023
Fixes redhat-developer#596

Signed-off-by: azerr <azerr@redhat.com>
angelozerr pushed a commit to angelozerr/vscode-quarkus that referenced this issue Jul 21, 2023
Fixes redhat-developer#596

Signed-off-by: azerr <azerr@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request qute
Projects
None yet
Development

No branches or pull requests

3 participants