]> thyrsus.com Git - ctopy.git/commitdiff
Also handles boxed comment in ai.c, but with simpler rules.
authorEric S. Raymond <esr@thyrsus.com>
Thu, 28 Sep 2006 20:31:55 +0000 (20:31 +0000)
committerEric S. Raymond <esr@thyrsus.com>
Thu, 28 Sep 2006 20:31:55 +0000 (20:31 +0000)
ctopy

diff --git a/ctopy b/ctopy
index 305beb4b03e88cffb0b1aa7f0e86adbdf4bce72c..841decfffa14037bb1eb62c3aea37be37e9b311d 100755 (executable)
--- a/ctopy
+++ b/ctopy
@@ -169,9 +169,9 @@ def ctopy(input, debug=0):
                 if regions[i].count("\n") <= 1:                # winged comment
                     regions[i] = "#" + regions[i][2:-2]
                 elif re.search("/\*+\n", regions[i]):  # boxed comment
-                    regions[i] = re.sub(r"\n([ \t]*) \*", r"\n\1# ", regions[i])
-                    regions[i] = re.sub(r"^([ \t]*)/\*+", r"\1#", regions[i])
-                    regions[i] = re.sub(r"\n([ \t]*)\*+/$", r"\n\1#", regions[i])
+                    regions[i] = re.sub(r"\n([ \t]*) \*", r"\n\1 ", regions[i])
+                    regions[i] = re.sub(r"^([ \t]*)/\*+", r"\1", regions[i])
+                    regions[i] = re.sub(r"\n([ \t]*)\*+/$", r"\n\1", regions[i])
                     regions[i] = re.sub(r"\n([ \t]*)(?!#)", r"\n\1# ", regions[i])
                 else:
                     regions[i] = regions[i].replace("/*", "#")