intellij-latte icon indicating copy to clipboard operation
intellij-latte copied to clipboard

Verbose n:tag-if

Open Mikulas opened this issue 11 years ago • 3 comments
trafficstars

The following gist renders with Latte

{if $foo}
    <a href="{$topic->link}">
{/if}
foo
{if $foo}
    </a>
{/if}

Fails on

, LatteTokenType.T_HTML_CLOSE_TAG_OPEN, LatteTokenType.T_MACRO_COMMENT, LatteTokenType.T_TEXT or LatteTokenType.T_WHITESPACE expected, got '{/' at line 61  

Highlighting this as error might be a feature though since the anchor might never get closed (even if the condition is same).

(This example is a simplification of https://github.com/fitak/fitak/blob/5c94599/app/components/StreamControl/StreamControl.latte#L60)

Mikulas avatar Oct 07 '14 16:10 Mikulas

Thanks for reporting, but this is a known limitation. You need to wait for 0.2 release.

JanTvrdik avatar Oct 07 '14 18:10 JanTvrdik

fixed, but the formatting is a bit weird. will examine

matej21 avatar Mar 12 '16 18:03 matej21

hmm, formatting is also broken in smarty and php. So I am afraid it cannot be fixed :\

matej21 avatar Mar 12 '16 19:03 matej21