From c577448bbdb7711a4e38fea5325e80b4b7dea058 Mon Sep 17 00:00:00 2001 From: Owen W. Taylor Date: Mon, 16 Feb 2009 23:23:25 +0000 Subject: 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 --- 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 -- cgit v0.9.1