We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6f73eaa commit a3e3a5fCopy full SHA for a3e3a5f
shared/src/main/scala/scala/xml/Utility.scala
@@ -104,7 +104,7 @@ object Utility extends AnyRef with parsing.TokenTests {
104
val escMap = pairs map { case (s, c) => c -> ("&%s;" format s) }
105
val unescMap = pairs ++ Map("apos" -> '\'')
106
}
107
- import Escapes.unescMap
+ import Escapes.{ escMap, unescMap }
108
109
/**
110
* Appends escaped string to `s`.
@@ -115,7 +115,7 @@ object Utility extends AnyRef with parsing.TokenTests {
115
text.iterator.foldLeft(s) { (s, c) =>
116
escMap.get(c) match {
117
case Some(str) => s ++= str
118
- case _ => if c >= ' ' || "\n\r\t".contains(c) => s += c
+ case _ if c >= ' ' || "\n\r\t".contains(c) => s += c
119
case _ => s // noop
120
121
0 commit comments