Summary: | Commented xml elements break xml intendation | ||
---|---|---|---|
Product: | [Applications] kate | Reporter: | Jiri Klement <jiri.klement> |
Component: | indentation | Assignee: | KWrite Developers <kwrite-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | christoph, fabian |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | http://commits.kde.org/kate/b79d22f6a32cb9db8bab78447f3b984a97729e0b | Version Fixed In: | 4.11 |
Sentry Crash Report: |
Description
Jiri Klement
2008-09-29 10:16:29 UTC
Bug still exists. KDE 4.6.00, Kate 3.6.0 Milian, do you plan to do something about it? Fabian and Jiri: The xml indenter can be found in e.g. /usr/share/kde4/apps/katepart/script/xml.js, or in a similar location on your system. It's plain javascript, if you want, you can try to improve it and contribute a better version! See: http://docs.kde.org/stable/en/kdebase-runtime/kate/advanced-editing-tools-scripting.html I'd like to fix it eventually but I simply don't have enough time right now for it - sorry. If someone else could work on it I'd appreciate it and would gladly give a hand. We have the indenters as javascript for the reason that users can help to maintain them. If you want to provide a patch, please reopen, else this stays closed. Git commit b79d22f6a32cb9db8bab78447f3b984a97729e0b by Gerald Senarclens de Grancy. Committed on 16/04/2013 at 01:41. Pushed by geralds into branch 'master'. Rewrote xml indenter and added a small test-suite removed many of the really complicated regular expressions and replaced them using the nice .isComment, .isCode, ... functions also works properly on aligning etc. REVIEW: 110018 M +129 -122 part/script/data/indentation/xml.js M +17 -1 part/script/data/libraries/string.js A +1 -0 tests/data/indent/xml/.kateconfig A +2 -0 tests/data/indent/xml/arguments1/expected A +3 -0 tests/data/indent/xml/arguments1/input.js A +1 -0 tests/data/indent/xml/arguments1/origin A +3 -0 tests/data/indent/xml/arguments2/expected A +3 -0 tests/data/indent/xml/arguments2/input.js A +2 -0 tests/data/indent/xml/arguments2/origin A +3 -0 tests/data/indent/xml/arguments3/expected A +3 -0 tests/data/indent/xml/arguments3/input.js A +2 -0 tests/data/indent/xml/arguments3/origin A +3 -0 tests/data/indent/xml/arguments4/expected A +3 -0 tests/data/indent/xml/arguments4/input.js A +2 -0 tests/data/indent/xml/arguments4/origin A +3 -0 tests/data/indent/xml/closing1/expected A +3 -0 tests/data/indent/xml/closing1/input.js A +2 -0 tests/data/indent/xml/closing1/origin A +3 -0 tests/data/indent/xml/closing2/expected A +3 -0 tests/data/indent/xml/closing2/input.js A +2 -0 tests/data/indent/xml/closing2/origin A +3 -0 tests/data/indent/xml/closing3/expected A +4 -0 tests/data/indent/xml/closing3/input.js A +2 -0 tests/data/indent/xml/closing3/origin A +1 -0 tests/data/indent/xml/comment1/README A +3 -0 tests/data/indent/xml/comment1/expected A +3 -0 tests/data/indent/xml/comment1/input.js A +2 -0 tests/data/indent/xml/comment1/origin A +4 -0 tests/data/indent/xml/comment2/expected A +11 -0 tests/data/indent/xml/comment2/input.js A +4 -0 tests/data/indent/xml/comment2/origin A +3 -0 tests/data/indent/xml/opening1/expected A +4 -0 tests/data/indent/xml/opening1/input.js A +1 -0 tests/data/indent/xml/opening1/origin A +2 -0 tests/data/indent/xml/self_closing1/expected A +3 -0 tests/data/indent/xml/self_closing1/input.js A +1 -0 tests/data/indent/xml/self_closing1/origin A +2 -0 tests/data/indent/xml/text1/expected A +3 -0 tests/data/indent/xml/text1/input.js A +1 -0 tests/data/indent/xml/text1/origin A +2 -0 tests/data/indent/xml/text2/expected A +3 -0 tests/data/indent/xml/text2/input.js A +1 -0 tests/data/indent/xml/text2/origin A +35 -0 tests/data/indent/xml/xhtml1/expected A +66 -0 tests/data/indent/xml/xhtml1/input.js A +1 -0 tests/data/indent/xml/xhtml1/origin M +12 -0 tests/indenttest.cpp M +3 -0 tests/indenttest.h http://commits.kde.org/kate/b79d22f6a32cb9db8bab78447f3b984a97729e0b |