Closed CWempe closed 7 years ago
I don’t know, really. ¯\_(ツ)_/¯
Hmm. We’re only calling external tools to do the formatting. E.g. see for your XML case: https://github.com/michalrus/git-hooks-code-autoformat/blob/master/autoformat/xml
So if you’re able to make xmllint
behave how you want it to behave, it’ll work with this project.
I don’t know much about XML, but notice that if <tspan
started on the next another line, there’d be whitespace between the previous </tspan>
and the next <tspan>
, right? Whitespace between tags is a plain text object in XML, therefore the resulting XML would be different semantically.
IMO, xmllint
is doing the correct thing here. :slightly_smiling_face:
I’ll close this one as out of scope. It should be an issue for xmllint (or another svg formatter of your choice). But I personally wouldn’t open it there (see above for reasons).
Also, if you could make a PR adding svg
s to https://github.com/michalrus/git-hooks-code-autoformat/blob/master/autoformat/xml.patterns it’d be great!
I would like to use this project to autoformat svg files I create with Inkscape.
Unfortunately the code is still not perfectly formated. 😢
I only added one character to the text. See:
It would also be great if the style-attributes would be splittet into separate lines as well.
Is this possible?
Thanks