From: Vladimír Vondruš Date: Sun, 4 Feb 2018 21:07:42 +0000 (+0100) Subject: doxygen: avoid trailing spaces in search pretty-print. X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~cjwatson/git?a=commitdiff_plain;h=9cb4211f50dc074a48ef9f0455cd6841ef360889;p=blog.git doxygen: avoid trailing spaces in search pretty-print. --- diff --git a/doxygen/test/test_search.py b/doxygen/test/test_search.py index 6e437d2e..369376e4 100755 --- a/doxygen/test/test_search.py +++ b/doxygen/test/test_search.py @@ -146,7 +146,7 @@ def pretty_print_map(serialized: bytes, colors=False): extra += ['type={}'.format((flags & ResultFlag._TYPE).name)] next_offset = ResultMap.offset_struct.unpack_from(serialized, (i + 1)*4)[0] & 0x00ffffff name, _, url = serialized[offset:next_offset].partition(b'\0') - out += color_map['cyan'] + str(i) + color_map['blue'] + ': ' + color_map['white'] + name.decode('utf-8') + color_map['blue'] + ' [' + color_map['yellow'] + (color_map['blue'] + ', ' + color_map['yellow']).join(extra) + color_map['blue'] + '] -> ' + color_map['reset'] + url.decode('utf-8') + out += color_map['cyan'] + str(i) + color_map['blue'] + ': ' + color_map['white'] + name.decode('utf-8') + color_map['blue'] + ' [' + color_map['yellow'] + (color_map['blue'] + ', ' + color_map['yellow']).join(extra) + color_map['blue'] + '] ->' + (' ' + color_map['reset'] + url.decode('utf-8') if url else '') offset = next_offset return out