Skip to content

scala.xml.XML.write with minimizeTags = xml.MinimizeMode.Never still abbreviates tags #38

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
adriaanm opened this issue Dec 3, 2014 · 0 comments
Milestone

Comments

@adriaanm
Copy link
Contributor

adriaanm commented Dec 3, 2014

[Originally reported by @ptwithy at https://issues.scala-lang.org/browse/SI-8834]

Looking at the source here:
https://github.com/scala/scala/blob/v2.10.4/src/library/scala/xml/Utility.scala#L227
I can see that the problem is that minimizeTags is not being passed in recursive calls to sequenceToXML. It should be a 1-line fix...
*** 224,230 ****
} else {
// children, so use long form: <xyz ...>...
sb.append('>')
! sequenceToXML(el.child, el.scope, sb, stripComments)
sb.append("</")
el.nameToString(sb)
sb.append('>')
--- 224,230 ----
} else {
// children, so use long form: <xyz ...>...
sb.append('>')
! sequenceToXML(el.child, el.scope, sb, stripComments, minimizeTags = minimizeTags)
sb.append("</")
el.nameToString(sb)
sb.append('>')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant