[valadoc] gir-importer: Ignore <attribute> tags



commit b4f3f73a01b86fe7f9edde7a3991b493346eea23
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Sun Jun 11 12:49:40 2017 +0200

    gir-importer: Ignore <attribute> tags

 .../importer/girdocumentationimporter.vala         |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/src/libvaladoc/importer/girdocumentationimporter.vala 
b/src/libvaladoc/importer/girdocumentationimporter.vala
index 9984dd5..3228dbe 100644
--- a/src/libvaladoc/importer/girdocumentationimporter.vala
+++ b/src/libvaladoc/importer/girdocumentationimporter.vala
@@ -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 ();
                }
        }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]