Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 209026 - Twig auto-formatting errors
Twig auto-formatting errors
Status: RESOLVED FIXED
Product: php
Classification: Unclassified
Component: Twig
7.2
All All
: P3 with 18 votes (vote)
: 7.4
Assigned To: Ondrej Brejla
issues@php
:
: 226870 228332 230239 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-03-01 04:17 UTC by m_gol
Modified: 2016-12-24 05:42 UTC (History)
5 users (show)

See Also:
Issue Type: DEFECT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description m_gol 2012-03-01 04:17:01 UTC
The current Twig plugin has auto-formatting errors, e.g. such a simple document:

<html>
    <body>
        {% block body %}{% endblock %}
    </body>
</html>

is incorrectly auto-formatted to that one:

<html>
    <body>
        {% block body %}{% endblock %}
        </body>
    </html>

What's the status of Twig support by the way? The plugin hasn't been updated for 6 months now...
Comment 1 Tomas Mysik 2012-03-01 05:03:17 UTC
(In reply to comment #0)
> What's the status of Twig support by the way? The plugin hasn't been updated
> for 6 months now...

The status is that the plugin from plugin portal was created by our community. And this plugin is now part of NetBeans (will be present in NB 7.2).

Thanks for reporting.
Comment 2 Ondrej Brejla 2012-09-03 12:22:09 UTC
Still reproducible in 

Product Version: NetBeans IDE Dev (Build 20120903-b98711cc48ee)
Java: 1.6.0_26; Java HotSpot(TM) Client VM 20.1-b02
System: Linux version 3.2.0-29-generic-pae running on i386; UTF-8; cs_CZ (nb)

But Twig support doesn't have its own formatter, so it has to be implemeted.
Comment 3 Ondrej Brejla 2013-03-01 07:10:54 UTC
*** Bug 226870 has been marked as a duplicate of this bug. ***
Comment 4 dextervip 2013-03-01 13:21:38 UTC
Any update? I am having problems in netbeans 7.3 final as it is in this example https://gist.github.com/dextervip/5062020
Comment 5 Vladimir Riha 2013-04-08 07:24:58 UTC
*** Bug 228332 has been marked as a duplicate of this bug. ***
Comment 6 Ondrej Brejla 2013-05-22 09:46:08 UTC
The main problem is that the HTML part is indented wrongly. I'll try to fix it.
Comment 7 Ondrej Brejla 2013-05-22 11:52:16 UTC
Fixed in web-main #930a1fbe5206

Html should be indented properly.
Comment 8 dextervip 2013-05-22 16:37:35 UTC
Great! Is it available at nightly trunk now?
Comment 9 Quality Engineering 2013-05-23 02:35:19 UTC
Integrated into 'main-golden', will be available in build *201305222300* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/930a1fbe5206
User: Ondrej Brejla <obrejla@netbeans.org>
Log: #209026 - Twig auto-formatting errors
Comment 10 mmolda 2013-05-24 16:08:20 UTC
*** Bug 230239 has been marked as a duplicate of this bug. ***
Comment 11 bczyz 2013-07-01 11:07:45 UTC
Issue not fixed in 7.3.1 (201306052037)
Comment 12 Ondrej Brejla 2013-07-01 11:09:34 UTC
Yes, that's why here is a target milestone set to 7.4.
Comment 13 clauziere 2014-01-07 21:36:32 UTC
Is this fixed in 7.4?
Does not seem to be fixed.
Comment 14 ybouhjira 2014-02-25 00:31:47 UTC
This bug is still present in 7.4
Comment 15 Ondrej Brejla 2014-02-25 08:45:37 UTC
Basic case was fixed in 7.4. But I rewrote it almost from scratch for 8.0.
Comment 16 b1385616 2014-10-27 11:06:23 UTC
I get:

{% block choice_widget_expanded -%}
    <div {{ block('widget_container_attributes') }}>
        {%- for child in form %}
        <div class="chooseOptionBox">
            {{- form_widget(child) -}}
            {{- form_label(child) -}}
        </div>
        {% endfor -%}
        </div>
        {% endblock choice_widget_expanded %}


instead of:

{% block choice_widget_expanded -%}
    <div {{ block('widget_container_attributes') }}>
        {%- for child in form %}
        <div class="chooseOptionBox">
            {{- form_widget(child) -}}
            {{- form_label(child) -}}
        </div>
        {% endfor -%}
    </div>
{% endblock choice_widget_expanded %}
Comment 17 junichi11 2016-12-24 05:42:20 UTC
(In reply to b1385616 from comment #16)
> I get:
> 
> {% block choice_widget_expanded -%}
>     <div {{ block('widget_container_attributes') }}>
>         {%- for child in form %}
>         <div class="chooseOptionBox">
>             {{- form_widget(child) -}}
>             {{- form_label(child) -}}
>         </div>
>         {% endfor -%}
>         </div>
>         {% endblock choice_widget_expanded %}
> 
> 
> instead of:
> 
> {% block choice_widget_expanded -%}
>     <div {{ block('widget_container_attributes') }}>
>         {%- for child in form %}
>         <div class="chooseOptionBox">
>             {{- form_widget(child) -}}
>             {{- form_label(child) -}}
>         </div>
>         {% endfor -%}
>     </div>
> {% endblock choice_widget_expanded %}

I have submitted this as a new issue[1].

[1] http://netbeans.org/bugzilla/show_bug.cgi?id=269423

Thanks.


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo