From: Timo Heister Date: Wed, 11 Feb 2015 15:58:31 +0000 (-0500) Subject: wrapcomments.py: do not break @page X-Git-Tag: v8.3.0-rc1~484^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F518%2Fhead;p=dealii.git wrapcomments.py: do not break @page --- diff --git a/contrib/utilities/wrapcomments.py b/contrib/utilities/wrapcomments.py index 9dc12dc78a..ac2c2414a7 100755 --- a/contrib/utilities/wrapcomments.py +++ b/contrib/utilities/wrapcomments.py @@ -110,6 +110,16 @@ def format_block(lines, infostr=""): if it in thisline and thisline!=it: print ("%s warning %s not in separate line"%(infostr, it), file=sys.stderr) out.append(start + thisline) + elif "@page" in lines[idx]: + # do not break @page + if curlines!=[]: + out.extend(wrap_block(remove_junk(curlines), start)) + curlines=[] + thisline = remove_junk([lines[idx]])[0] + if not thisline.startswith("@page") and not thisline.startswith("(@page"): + print ("%s warning %s not at start of line"%(infostr, "@page"), file=sys.stderr) + out.append(start + thisline.strip()) + elif "@ref" in lines[idx]: # @ref link "some long description" # is special, and we mustn't break it @@ -388,6 +398,14 @@ lineO = [" /**", \ " */"] assert(format_block(lineI)==lineO) +# do not break @page: +longtext = "bla bla"*20 +lineI = [" /**", \ + " * @page " + longtext, \ + " * hello", \ + " */"] +assert(format_block(lineI)==lineI) +