summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohan Dahlin <johan@src.gnome.org>2009-01-12 13:50:00 +0000
committerJohan Dahlin <johan@src.gnome.org>2009-01-12 13:50:00 +0000
commite856020a3f911e758ab95d6704c456fea5b403a3 (patch)
tree12fd89d9a82a25d4fa2a6274cf461615a0bdc050
parent716d64a8e02afc3bc89b2f4927707865b7c62c80 (diff)
downloadgobject-introspection-annotation.tar.gz
Allow gtk-doc comments with trailing whitespace after :annotation
svn path=/branches/annotation/; revision=1016
-rw-r--r--giscanner/annotationparser.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/giscanner/annotationparser.py b/giscanner/annotationparser.py
index 12b6063c..630508a9 100644
--- a/giscanner/annotationparser.py
+++ b/giscanner/annotationparser.py
@@ -119,8 +119,11 @@ class AnnotationParser(object):
comment = comment[len(_COMMENT_HEADER):]
pos = comment.index('\n ')
- block = DocBlock(comment[:pos-1])
-
+ block_name = comment[:pos]
+ block_name = block_name.strip()
+ if not block_name.endswith(':'):
+ return
+ block = DocBlock(block_name[:-1])
content = comment[pos+1:]
for line in content.split('\n'):
line = line[2:].strip() # Skip ' *'