@@ -0,0 +1,734 @@
+#!/usr/bin/python%0A%0Aimport sys%0Aimport os%0A%0Afirst_arg = sys.argv%5B1%5D%0A%0Adef endswith(line, char):%0A  idx = -1%0A  if line%5B-1%5D == %22%5Cn%22:%0A    idx = -2%0A  return line%5Bidx%5D == char%0A%0Aif not os.path.exists(first_arg):%0A  print(%22Not a file: %7B0%7D%22.format(first_arg))%0A  sys.exit(1)%0A%0Awith open(first_arg) as f:%0A    lines = f.readlines()%0A    mod_lines = %5B%5D%0A    flag = False%0A    for line in lines:%0A        if %22%3C%3C%3C%22 in line:%0A            flag = True%0A%0A        if flag:%0A            if not endswith(line, %22)%22):%0A                mod_lines.append(line.rstrip(%22%5Cn%22))%0A            else:%0A                mod_lines.append(line)%0A                flag = False%0A        else:%0A            mod_lines.append(line)%0A%0A    contents = ''.join(mod_lines)%0A    sys.stdout.write(contents)%0A

fix it in order to include more than one newline breaks