redhat-developer / quarkus-ls

Language server for Quarkus tooling
Eclipse Public License 2.0
44 stars 15 forks source link

Support ? in parameter let section #904

Closed angelozerr closed 11 months ago

angelozerr commented 11 months ago

If you open https://github.com/ia3andy/quarkus-blast/blob/aa969f34616ec63be0268fee20a40097d2ec1ba4/src/main/resources/templates/layout/page.html#L7 you will have an error which says that name is required.

image

It is because the user tag defines name https://github.com/quarkiverse/quarkus-web-bundler/blob/3603361f4db3f6d45f90de8b6667505afc4218af/runtime/src/main/resources/templates/tags/bundleStyle.html#L2

But name is defined here https://github.com/quarkiverse/quarkus-web-bundler/blob/3603361f4db3f6d45f90de8b6667505afc4218af/runtime/src/main/resources/templates/tags/bundleStyle.html#L1 and uses ?. As we don't support ? the let parameter is name? instead of name and in this case we consider that name is a required parameter instead of an optional parameter.

datho7561 commented 11 months ago

If I create a custom tag:

{#let title?="my cool flexbox"}
<div style="display: flex; gap: 8px; flex-direction: column-reverse;">
    <div>
    1. Qui amet tempor do occaecat elit ullamco ex enim.
    </div>
    <div>
    2. Nisi consequat do occaecat minim proident pariatur qui magna non.
    </div>
    <div>
    3. Proident amet excepteur minim nostrud Lorem enim quis dolore tempor quis.
    </div>
    <div>
        {title}
    </div>
</div>
{/let}

then include it in one of the pages, it still complains about title being missing.

angelozerr commented 11 months ago

Have you tested quarkus blast sample?

angelozerr commented 11 months ago

@datho7561 please retry.