Closed angelozerr closed 1 year ago
@JessicaJHee here a new PR which do the samething than PR https://github.com/redhat-developer/quarkus-ls/pull/806 but without updating end tag section (since {/}
is a valid end section). Here a demo:
The code of this PT should be clean, you can review it.
If you have an unnamed close tag right after what you're writing, then it will never generate a close tag for tag completion, even if there aren't enough unnamed close tags to match the content you are generating:
If you have an unnamed close tag right after what you're writing, then it will never generate a close tag for tag completion, even if there aren't enough unnamed close tags to match the content you are generating:
I have improved template parser to take care of this usecase. Please retry it.
@JessicaJHee could you check if it is working with surround please.
Given the following template:
|{#each items}
{#each items}
{it.name}
{/each}
{#each items}
{#each items}
{it.name}
{/each}
{/}|
If I select between the two |
, then I get a lot of code action failure notifications
According this comment it is not a good idea to change the behavior of the parser.
I revert my change and to fix the original issue
{#each items}
{#|}
{/}
which didn't generate the full content of the snippet (only the first part of the section), I check if parent section of {# is closed. In this case, #each is not closed because the {/}
is linked to {#
. As parent section of {#
(which is the #each) is not closed, the full content of the snippet must be generated.
@datho7561 please retry it and I suggest that you get https://github.com/redhat-developer/vscode-quarkus/pull/585 to play with surround too.
Here a demo:
Seems pretty good so far, I'm going to try it out with https://github.com/redhat-developer/vscode-quarkus/pull/585 and see how that goes...
Generate only start section when empty end section is foundCompletion should generate only start section when empty end section is found
Fixes #805
Signed-off-by: azerr azerr@redhat.com