]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
gir-importer: Ignore <attribute> tags
authorRico Tzschichholz <ricotz@ubuntu.com>
Sun, 11 Jun 2017 10:49:40 +0000 (12:49 +0200)
committerRico Tzschichholz <ricotz@ubuntu.com>
Sun, 11 Jun 2017 10:49:40 +0000 (12:49 +0200)
src/libvaladoc/importer/girdocumentationimporter.vala

index 9984dd59b472a9e2f546a54f0c9c2511e3d72316..3228dbec172137b5925b813b0cb6c4e7fe9d9adf 100644 (file)
@@ -177,9 +177,10 @@ public class Valadoc.Importer.GirDocumentationImporter : DocumentationImporter {
        private void next () {
                current_token = reader.read_token (out begin, out end);
 
-               // Skip <annotation /> (only generated by valac)
-               if (current_token == MarkupTokenType.START_ELEMENT && reader.name == "annotation") {
-                       next (); // MarkupTokenType.END_ELEMENT, annotation
+               // Skip <annotation /> (only generated by valac) and <attribute />
+               if (current_token == MarkupTokenType.START_ELEMENT
+                   && (reader.name == "annotation" || reader.name == "attribute")) {
+                       next (); // MarkupTokenType.END_ELEMENT, annotation / attribute
                        next ();
                }
        }