chiark / gitweb /
doxygen: avoid trailing spaces in search pretty-print.
authorVladimír Vondruš <mosra@centrum.cz>
Sun, 4 Feb 2018 21:07:42 +0000 (22:07 +0100)
committerVladimír Vondruš <mosra@centrum.cz>
Sun, 4 Feb 2018 22:56:27 +0000 (23:56 +0100)
doxygen/test/test_search.py

index 6e437d2e9bd1416a986440f4ff3b5edd296fef40..369376e4b2f701cef06a07448b661db3bd047a4f 100755 (executable)
@@ -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