From 8a2bbb136170be0f7e4e8d093ec6ea6085fa76cc Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Thu, 28 Sep 2006 21:05:56 +0000 Subject: [PATCH] Boxed comments almost right, comment start delimiter in battle.c not correct. --- ctopy | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ctopy b/ctopy index 841decf..ab94e2a 100755 --- a/ctopy +++ b/ctopy @@ -169,9 +169,10 @@ 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"\n([ \t]*)\*", r"\n\1", regions[i]) + regions[i] = re.sub(r"^([ \t]*)/\*+\n", r"\1\n", 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("/*", "#") -- 2.43.0