summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/library/scala/xml/Xhtml.scala7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/library/scala/xml/Xhtml.scala b/src/library/scala/xml/Xhtml.scala
index 2d0b33b6ad..1fe16c71b3 100644
--- a/src/library/scala/xml/Xhtml.scala
+++ b/src/library/scala/xml/Xhtml.scala
@@ -97,11 +97,8 @@ object Xhtml
stripComment: Boolean,
convertAmp: Boolean): Unit =
{
- def isAtomOrText(x: Node) = x match {
- case _: Atom[_] | _: Text => true
- case _ => false
- }
- val doSpaces = children forall isAtomOrText // interleave spaces
+ def isAtomAndNotText(x: Node) = x.isInstanceOf[Atom[_]] && !x.isInstanceOf[Text]
+ val doSpaces = children forall isAtomAndNotText // interleave spaces
for (c <- children.take(children.length - 1)) {
toXhtml(c, pscope, sb, stripComment, convertAmp)