Skip to content

Commit

Permalink
Revert removeal of escMap import in de0b47e
Browse files Browse the repository at this point in the history
  • Loading branch information
ashawley committed May 24, 2017
1 parent c239469 commit 60cfbde
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions shared/src/main/scala/scala/xml/Utility.scala
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ object Utility extends AnyRef with parsing.TokenTests {
val escMap = (pairs - "apos") map { case (s, c) => c -> ("&%s;" format s) }
val unescMap = pairs
}
import Escapes.unescMap
import Escapes.{ escMap, unescMap }

/**
* Appends escaped string to `s`.
Expand All @@ -113,7 +113,7 @@ object Utility extends AnyRef with parsing.TokenTests {
text.iterator.foldLeft(s) { (s, c) =>
escMap.get(c) match {
case Some(str) => s ++= str
case _ => if c >= ' ' || "\n\r\t".contains(c) => s += c
case _ if c >= ' ' || "\n\r\t".contains(c) => s += c
case _ => s // noop
}
}
Expand Down

0 comments on commit 60cfbde

Please sign in to comment.