diff options
author | Owen W. Taylor <otaylor@fishsoup.net> | 2009-02-16 23:23:25 (GMT) |
---|---|---|
committer | Owen W. Taylor <otaylor@fishsoup.net> | 2009-02-17 16:12:07 (GMT) |
commit | c577448bbdb7711a4e38fea5325e80b4b7dea058 (patch) | |
tree | f41932e91b5b0e9677fbef21c129f05edeeffe6d | |
parent | 09a698b389b5335fa3232ff2099b8880f14b7176 (diff) |
Parse doc-comment tags case-insensitive
gtk-doc treats tags like 'Return value:' or 'Since:' as case-insensitive,
do the same to make things as predictable as possibe and avoid strange
problems where a 'Return Value:' tag work with gtk-doc but not
g-ir-scanner.
http://bugzilla.gnome.org/show_bug.cgi?id=572086
-rw-r--r-- | giscanner/annotationparser.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/giscanner/annotationparser.py b/giscanner/annotationparser.py index e5ecc64..003ff2c 100644 --- a/giscanner/annotationparser.py +++ b/giscanner/annotationparser.py @@ -39,10 +39,10 @@ from .glibast import GLibBoxed _COMMENT_HEADER = '*\n ' # Tags - annotations applyed to comment blocks -TAG_SINCE = 'Since' -TAG_DEPRECATED = 'Deprecated' -TAG_RETURNS = 'Returns' -TAG_RETURNS_ALT = 'Return value' +TAG_SINCE = 'since' +TAG_DEPRECATED = 'deprecated' +TAG_RETURNS = 'returns' +TAG_RETURNS_ALT = 'return value' # Options - annotations for parameters and return values OPT_ALLOW_NONE = 'allow-none' @@ -179,7 +179,7 @@ class AnnotationParser(object): comment_lines.append(line) continue tag = self._parse_tag(line) - block.tags[tag.name] = tag + block.tags[tag.name.lower()] = tag block.comment = '\n'.join(comment_lines) self._blocks[block.name] = block |