Selaa lähdekoodia

treat comments as blank

Nicolas Cannasse 17 vuotta sitten
vanhempi
commit
413746bbb0
2 muutettua tiedostoa jossa 2 lisäystä ja 1 poistoa
  1. 1 0
      doc/CHANGES.txt
  2. 1 1
      std/haxe/xml/Check.hx

+ 1 - 0
doc/CHANGES.txt

@@ -11,6 +11,7 @@
 	fixed some minor things in flash10 api
 	switch/for/while/do/try/if are no longer using parse_next (parenthesises requ. instead)
 	fixed Type.typeof and Std.is in case of too much large integers for Flash6-8/JS
+	haxe.xml.Check : treat comments the same as PCDATA spaces
 
 2008-10-04: 2.01
 	fixed php.Sys

+ 1 - 1
std/haxe/xml/Check.hx

@@ -62,7 +62,7 @@ class Check {
 	static var blanks = ~/^[ \r\n\t]*$/;
 
 	static function isBlank( x : Xml ) {
-		return( x.nodeType == Xml.PCData && blanks.match(x.nodeValue) );
+		return( x.nodeType == Xml.PCData && blanks.match(x.nodeValue) ) || x.nodeType == Xml.Comment;
 	}
 
 	static function filterMatch( s : String, f : Filter ) {