putypuruty / veloeclipse

Automatically exported from code.google.com/p/veloeclipse
Other
0 stars 0 forks source link

Fromatter: Nested if and elseif with wrong intent #37

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
The following code:

#if($bar)
Hello,
#if($foo)
small
#end
World!
#elseif($bar2)
Hello again,
#if($foo)
small
#end
World!
#else
Bye!,
#if($foo)
small
#end
World!
#end

is formated as:

#if($bar)
    Hello,
    #if($foo)
        small
    #end
    World!
    #elseif($bar2)
        Hello again,
        #if($foo)
            small
        #end
        World!
        #else
            Bye!,
            #if($foo)
                small
            #end
            World!
#end

but correct would be:

#if($bar)
    Hello,
    #if($foo)
        small
    #end
    World!
#elseif($bar2)
    Hello again,
    #if($foo)
        small
    #end
    World!
#else
    Bye!,
    #if($foo)
        small
    #end
    World!
#end

Original issue reported on code.google.com by deepweb...@googlemail.com on 15 Jun 2011 at 2:36