nette-intellij / intellij-latte

Latte plugin for IntelliJ IDEA platform
MIT License
113 stars 21 forks source link

Verbose n:tag-if #11

Open Mikulas opened 9 years ago

Mikulas commented 9 years ago

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)

JanTvrdik commented 9 years ago

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

matej21 commented 8 years ago

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

matej21 commented 8 years ago

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