Skip to content
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

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

Closed
scabug opened this issue Sep 2, 2014 · 4 comments

Comments

@scabug
Copy link

scabug commented Sep 2, 2014

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 ...>...</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 ...>...</xyz>
            sb.append('>')
!           sequenceToXML(el.child, el.scope, sb, stripComments, minimizeTags = minimizeTags)
            sb.append("</")
            el.nameToString(sb)
            sb.append('>')
@scabug
Copy link
Author

scabug commented Sep 2, 2014

Imported From: https://issues.scala-lang.org/browse/SI-8834?orig=1
Reporter: P T Withington (PTWithy)
Affected Versions: 2.10.4

@scabug
Copy link
Author

scabug commented Sep 19, 2014

@Blaisorblade said:
[~PTWithy], have you tried doing a pull request to https://github.com/scala/scala-xml?

@scabug
Copy link
Author

scabug commented Sep 19, 2014

P T Withington (PTWithy) said:
I think I just did scala/scala-xml#29

@scabug
Copy link
Author

scabug commented Jul 17, 2015

@SethTisue said:
The scala-xml library is now community-maintained. Issues with it are now tracked at https://github.com/scala/scala-xml/issues instead of here in the Scala JIRA.

Interested community members: if you consider this issue significant, feel free to open a new issue for it on GitHub, with links in both directions.

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

No branches or pull requests

1 participant