doxy: collapse empty comments instead of removing
authordberzano <dario.berzano@cern.ch>
Tue, 9 Dec 2014 20:07:21 +0000 (21:07 +0100)
committerdberzano <dario.berzano@cern.ch>
Fri, 9 Jan 2015 15:01:08 +0000 (16:01 +0100)
Necessary to make thtml2doxy idempotent (i.e. 2nd pass should make no
changes)

doxygen/thtml2doxy.py

index 153776e..e0ced0d 100755 (executable)
@@ -206,8 +206,9 @@ def comment_method(cursor, comments):
           logging.debug("Comment found for function %s" % Colt(comment_function).magenta())
           comments.append( Comment(comment, comment_line_start, comment_col_start, comment_line_end, comment_col_end, comment_indent, comment_function) )
         else:
-          logging.debug('Empty comment for function %s marked for removal' % Colt(comment_function).magenta())
-          comments.append(RemoveComment(comment_line_start, comment_line_end))
+          logging.debug('Empty comment found for function %s: collapsing' % Colt(comment_function).magenta())
+          comments.append( Comment([''], comment_line_start, comment_col_start, comment_line_end, comment_col_end, comment_indent, comment_function) )
+          #comments.append(RemoveComment(comment_line_start, comment_line_end))
 
       else:
         logging.warning('No comment found for function %s' % Colt(comment_function).magenta())