[pygobject] codegen/docextract.py: Stop final section processing on first match.



commit a2fcdecbb5e109da5568084d7acb2332af83b6f5
Author: José Alburquerque <jaalburqu svn gnome org>
Date:   Sun Apr 11 16:15:01 2010 -0400

    	codegen/docextract.py: Stop final section processing on first match.
    
    	* codegen/docextract.py (process_final_sections): Modify the final
    	section pattern matching for loop to stop on first match so that it
    	doesn't match both a colon return ('Returns: ...') and a no colon
    	return ('Returns ...') which leads to annotation extraction errors.

 codegen/docextract.py |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/codegen/docextract.py b/codegen/docextract.py
index aef0393..eff8c5e 100644
--- a/codegen/docextract.py
+++ b/codegen/docextract.py
@@ -347,6 +347,10 @@ def process_final_sections(fp, line, cur_doc):
                     # In case more lines need to be appended.
                     append_func = cur_doc.append_to_description
 
+                # Stop final section pattern matching for loop since a match
+                # has already been found.
+                break
+
         # Remove the no colon return pattern (which was temporarily added in
         # the just executed loop) from the list of final section patterns.
         final_section_patterns.pop()



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