diff options
author | Johan Dahlin <johan@gnome.org> | 2010-09-24 15:41:24 -0300 |
---|---|---|
committer | Johan Dahlin <johan@gnome.org> | 2010-09-24 16:06:54 -0300 |
commit | 4fd326d0dc1935be6e5ecb293fd157f9349d53aa (patch) | |
tree | 37c1e01aa80b496681db448f14b4eb1bce3ff90f /giscanner/annotationparser.py | |
parent | 7cc31be7753b124b7f17febbbe0607765b426fa0 (diff) | |
download | gobject-introspection-4fd326d0dc1935be6e5ecb293fd157f9349d53aa.tar.gz |
Add a script to extract gio annotations
Diffstat (limited to 'giscanner/annotationparser.py')
-rw-r--r-- | giscanner/annotationparser.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/giscanner/annotationparser.py b/giscanner/annotationparser.py index 282ea550..673d0a0a 100644 --- a/giscanner/annotationparser.py +++ b/giscanner/annotationparser.py @@ -138,7 +138,11 @@ class DocBlock(object): comment = '/**\n' for line in lines: - comment += ' * %s\n' % (line, ) + line = line.rstrip() + if line: + comment += ' * %s\n' % (line, ) + else: + comment += ' *\n' comment += ' */\n' return comment @@ -200,7 +204,7 @@ class DocTag(object): if value: if type(value) != str: value = ' '.join((serialize_one(k, v, '%s=%s', '%s') - for k,v in value.all().iteritems())) + for k, v in value.all().iteritems())) return fmt % (option, value) else: return fmt2 % (option, ) |