]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
xmlparser: Support single quotes for attributes
authorLuca Bruno <lucabru@src.gnome.org>
Mon, 17 Jun 2013 19:10:47 +0000 (21:10 +0200)
committerLuca Bruno <lucabru@src.gnome.org>
Fri, 21 Jun 2013 21:37:59 +0000 (23:37 +0200)
vala/valamarkupreader.vala

index 7f50c2db318d91f05ebc5f4e72aa00c516ab59d1..556853d571285b88799bf03093746f19fef8b945 100644 (file)
@@ -161,15 +161,15 @@ public class Vala.MarkupReader : Object {
                                                // error
                                        }
                                        current++;
-                                       // FIXME allow single quotes
-                                       if (current >= end || current[0] != '"') {
+                                       if (current >= end || current[0] != '"' || current[0] != '\'') {
                                                // error
                                        }
+                                       char quote = current[0];
                                        current++;
 
-                                       string attr_value = text ('"', false);
+                                       string attr_value = text (quote, false);
 
-                                       if (current >= end || current[0] != '"') {
+                                       if (current >= end || current[0] != quote) {
                                                // error
                                        }
                                        current++;