Skip to content

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

Closed
@scabug

Description

@scabug

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('>')

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions