summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorburaq <buraq@epfl.ch>2005-02-01 16:27:16 +0000
committerburaq <buraq@epfl.ch>2005-02-01 16:27:16 +0000
commit2ce58118dd0cf943f34017ff52ec809f4b3bd6a5 (patch)
treec21440eeb2491fd239d112bfe741a2b232777d15
parentb08c2c22a605ce4dc965a3bd85be2a9f803a4941 (diff)
downloadscala-2ce58118dd0cf943f34017ff52ec809f4b3bd6a5.tar.gz
scala-2ce58118dd0cf943f34017ff52ec809f4b3bd6a5.tar.bz2
scala-2ce58118dd0cf943f34017ff52ec809f4b3bd6a5.zip
fixed faulty handling of comments in toXML func...
fixed faulty handling of comments in toXML function
-rw-r--r--sources/scala/xml/Utility.scala12
1 files changed, 10 insertions, 2 deletions
diff --git a/sources/scala/xml/Utility.scala b/sources/scala/xml/Utility.scala
index 9a7b982ae5..03a26b1d37 100644
--- a/sources/scala/xml/Utility.scala
+++ b/sources/scala/xml/Utility.scala
@@ -177,7 +177,11 @@ object Utility {
sb.append(escape(t));
case Comment(text) =>
- if (stripComment) text else "";
+ if (!stripComment) {
+ sb.append("<!--");
+ sb.append(text);
+ sb.append("-->");
+ }
case _ if x.typeTag$ < 0 =>
sb.append( x.toString() );
@@ -228,7 +232,11 @@ object Utility {
sb.append(escape(t));
case Comment(text) =>
- if (stripComment) text else "";
+ if (!stripComment) {
+ sb.append("<!--");
+ sb.append(text);
+ sb.append("-->");
+ }
case _ if x.typeTag$ < 0 =>
sb.append( x.toString() );