[gtk-doc] scan: stip newlines before logging



commit ed29f3de2fb787bf353cc4588ff3e2db358ec585
Author: Stefan Sauer <ensonic users sf net>
Date:   Wed Aug 9 10:20:29 2017 +0200

    scan: stip newlines before logging

 gtkdoc/scan.py |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/gtkdoc/scan.py b/gtkdoc/scan.py
index c436c73..5f05c71 100644
--- a/gtkdoc/scan.py
+++ b/gtkdoc/scan.py
@@ -231,7 +231,7 @@ def ScanHeader(input_file, section_list, decl_list, get_types, options):
 
         # Skip to the end of the current comment.
         if in_comment:
-            logging.info('Comment: %s', line)
+            logging.info('Comment: %s', line.strip())
             doc_comment += line
             if re.search(r'\*/', line):
                 m = re.search(r'\* ([a-zA-Z][a-zA-Z0-9_]+):/', doc_comment)
@@ -275,7 +275,8 @@ def ScanHeader(input_file, section_list, decl_list, get_types, options):
         if deprecated_conditional_nest == 0 and '_DEPRECATED' in line:
             m = re.search(r'^\s*#\s*(if*|define)', line)
             if not (m or in_declaration == 'enum'):
-                logging.info('Found deprecation annotation (decl: "%s"): "%s"', in_declaration, line)
+                logging.info('Found deprecation annotation (decl: "%s"): "%s"',
+                             in_declaration, line.strip())
                 deprecated_conditional_nest += 0.1
 
         # set flag that is used later when we do AddSymbolToList
@@ -293,11 +294,11 @@ def ScanHeader(input_file, section_list, decl_list, get_types, options):
             if m:
                 re.sub(r'^\s*/\*', '', line)
                 if re.search(r'\*/', line):
-                    logging.info('Found one-line comment: %s', line)
+                    logging.info('Found one-line comment: %s', line.strip())
                 else:
                     in_comment = 1
                     doc_comment = line
-                    logging.info('Found start of comment: %s', line)
+                    logging.info('Found start of comment: %s', line.strip())
                 continue
 
             logging.info('no decl: %s', line.strip())


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