diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/ArgParser.java | 4 | ||||
-rw-r--r-- | src/argparser.py | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/ArgParser.java b/src/ArgParser.java index 728e63c..bb651f6 100644 --- a/src/ArgParser.java +++ b/src/ArgParser.java @@ -849,7 +849,7 @@ public class ArgParser first = empty; else first += empty.substring(first.length()); - String line = " \033[02m" + first + "\033[22m %colour%" + last; + String line = " \033[02m" + first + "\033[22m \0" + last; l += first.length() + 6 + last.length(); if (opt instanceof Variadic) { line += " [\033[04m" + opt.argument + "\033[24m...]"; @@ -874,7 +874,7 @@ public class ArgParser continue; boolean first = true; final String colour = (index & 1) == 0 ? "36" : "34"; - { String line = lines.get(index).replace("%colour%", "\033[" + colour + ";01m"); + { String line = lines.get(index).replace("\0", "\033[" + colour + ";01m"); line += empty.substring(lens.get(index)[0]); this.print(line, false); } diff --git a/src/argparser.py b/src/argparser.py index 330e08d..18a8899 100644 --- a/src/argparser.py +++ b/src/argparser.py @@ -428,7 +428,7 @@ class ArgParser(): alts[0] += ' ' * (maxfirstlen - len(alts[0])) for opt_alt in alts: if opt_alt is alts[-1]: - line += '%colour%' + opt_alt + line += '\0' + opt_alt l += len(opt_alt) if opt_type == ArgParser.ARGUMENTED: line += ' \033[04m%s\033[24m' % (opt_arg); l += len(opt_arg) + 1 elif opt_type == ArgParser.VARIADIC: line += ' [\033[04m%s\033[24m...]' % (opt_arg); l += len(opt_arg) + 6 @@ -447,7 +447,7 @@ class ArgParser(): continue first = True colour = '36' if (index & 1) == 0 else '34' - self.__print(lines[index].replace('%colour%', '\033[%s;01m' % (colour)), end=' ' * (col - lens[index])) + self.__print(lines[index].replace('\0', '\033[%s;01m' % (colour)), end=' ' * (col - lens[index])) for line in opt_help.split('\n'): if first: first = False |