Bug 330089

Summary: XML indentation does not decrease indentation level with open/close tags
Product: [Applications] kate Reporter: Stephan Mueller <smueller>
Component: indentationAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: kare.sars
Priority: NOR    
Version: 3.11.4   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In: KDE 4.12.2

Description Stephan Mueller 2014-01-17 17:45:42 UTC
The combination of blank lines and the use of open/close tags (i.e. <tag/>) causes the XML indentation to not indent the lines correctly. Use the following as an example:
<a>
        <aa id="bla">
                <aaa id="bla">
                        <aaaa id="bla">
                                <!--
                                something-->

                                <bbbb/>
                                <i>
                                        <p>bla</p>
                                </i>

                                <r>
                                        <p>bla</p>
                                </r>
                                <e>
                                        <p>bla</p>
                                </e>
                                <v some="bla"/>
                                </aaaa>

                                </aaa>
                        </aa>
                </a>

Reproducible: Always

Steps to Reproduce:
1. Add code above into kate
2. Call extras->ausrichten (in English extras->indent ?)
Comment 1 Kåre Särs 2014-03-06 20:26:37 UTC
Git commit dec54c31ebb1fabcbd0540e45243ad31c6636a87 by Kåre Särs.
Committed on 06/03/2014 at 20:13.
Pushed by sars into branch 'master'.

XML indentation: fix indentation when thee are empty lines
Related: bug 331764

M  +18   -9    part/script/data/indentation/xml.js
A  +15   -0    tests/data/indent/xml/empty_lines/expected
A  +8    -0    tests/data/indent/xml/empty_lines/input.js
A  +15   -0    tests/data/indent/xml/empty_lines/origin

http://commits.kde.org/kate/dec54c31ebb1fabcbd0540e45243ad31c6636a87
Comment 2 Kåre Särs 2014-03-06 20:53:21 UTC
Git commit 7281db92e4d187d58ad0e5f4a632c20c36af1095 by Kåre Särs.
Committed on 06/03/2014 at 20:13.
Pushed by sars into branch 'KDE/4.13'.

XML indentation: fix indentation when thee are empty lines
Related: bug 331764

M  +18   -9    part/script/data/indentation/xml.js
A  +15   -0    tests/data/indent/xml/empty_lines/expected
A  +8    -0    tests/data/indent/xml/empty_lines/input.js
A  +15   -0    tests/data/indent/xml/empty_lines/origin

http://commits.kde.org/kate/7281db92e4d187d58ad0e5f4a632c20c36af1095