This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 237326 - [indentation] wrong indentation of latte operators
Summary: [indentation] wrong indentation of latte operators
Status: VERIFIED FIXED
Alias: None
Product: php
Classification: Unclassified
Component: Latte (show other bugs)
Version: 7.4
Hardware: All All
: P3 normal (vote)
Assignee: Ondrej Brejla
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-18 16:36 UTC by malyzeli
Modified: 2013-11-12 13:50 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description malyzeli 2013-10-18 16:36:46 UTC
Autoformat formating my code like this:

    <a href="#">
      {ifset $create}
        {_"Create category"}
          {else}
            {_"Edit category"}
              {/ifset}
              </a>

IMHO correct output should be this:

    <a href="#">
      {ifset $create}
        {_"Create category"}
      {else}
        {_"Edit category"}
      {/ifset}
    </a>
Comment 1 mmolda 2013-10-22 11:41:44 UTC
Reproducible. {if} is working properly, {ifset} is not.

Product Version: NetBeans IDE Dev (Build 201310220001)
Java: 1.7.0_45; Java HotSpot(TM) Client VM 24.45-b08
Runtime: Java(TM) SE Runtime Environment 1.7.0_45-b18
System: Windows 7 version 6.1 running on x86; Cp1250; en_US (nb)
Comment 2 Ondrej Brejla 2013-10-29 10:07:25 UTC
Milane where you tested that? It doesn't work for "if" either.
Comment 3 Ondrej Brejla 2013-10-29 10:30:50 UTC
Nevertheless, I fixed that ;) Fixed in web-main #9f575d90fdd4
Comment 4 mmolda 2013-10-29 13:01:48 UTC
(In reply to Ondrej Brejla from comment #2)
> Milane where you tested that? It doesn't work for "if" either.

I tried other example, this one is working for IF and does not for IFSET..

{if $something}
    <p>{$something}</p>
{else}
    <p>nothing</p>
{/if}


(In reply to Ondrej Brejla from comment #3)
> Nevertheless, I fixed that ;) Fixed in web-main #9f575d90fdd4

I will test it :)
Comment 5 Ondrej Brejla 2013-10-29 13:08:52 UTC
Yep, but it's something different :) {_...} macros were considered as "block" macros (which were not closed by {/_...}). That's why it didn't work for "if" macros either :)
Comment 6 mmolda 2013-11-05 13:24:14 UTC
Verified, thanks.

Product Version: NetBeans IDE Dev (Build 201311050001)
Java: 1.7.0_45; Java HotSpot(TM) Client VM 24.45-b08
Runtime: Java(TM) SE Runtime Environment 1.7.0_45-b18
System: Windows 7 version 6.1 running on x86; Cp1250; en_US (nb)
Comment 7 Ondrej Brejla 2013-11-07 14:03:48 UTC
Transplanted to release74 branch in releases repo. Please, verify, thanks.
Comment 8 Quality Engineering 2013-11-11 20:12:20 UTC
Integrated into 'releases/release74', will be available in build *201311111738* or newer. Wait for official and publicly available build.

Changeset: http://hg.netbeans.org/releases/rev/5d6b92f3c06a
User: Ondrej Brejla <obrejla@netbeans.org>
Log: #237326 - [indentation] wrong indentation of latte operators
(transplanted from 9f575d90fdd43ee31ab52f1e02f0ee1272687797)
Comment 9 mmolda 2013-11-12 13:50:22 UTC
Verified.

Product Version: NetBeans IDE 7.4 (Build 201311111738)
Java: 1.7.0_45; Java HotSpot(TM) Client VM 24.45-b08
Runtime: Java(TM) SE Runtime Environment 1.7.0_45-b18
System: Windows 7 version 6.1 running on x86; Cp1250; en_US (nb)