def strip_tags(text):
return strip_tags_re.sub('', text)
+ symbol_count = 0
for result in state.search:
# Decide on prefix joiner. Defines are among the :: ones as well,
# because we need to add the function macros twice -- but they have no
keyword_index = map.add(title, '', alias=index, suffix_length=suffix_length)
trie.insert(search.lower(), keyword_index)
- return serialize_search_data(trie, map, len(state.search), merge_subtrees=merge_subtrees, merge_prefixes=merge_prefixes)
+ # Add this symbol and all its aliases to total symbol count
+ symbol_count += len(result.keywords) + 1
+
+ return serialize_search_data(trie, map, symbol_count, merge_subtrees=merge_subtrees, merge_prefixes=merge_prefixes)
def base85encode_search_data(data: bytearray) -> bytearray:
return (b"/* Generated by http://mcss.mosra.cz/doxygen/. Do not edit. */\n" +
#print(search_data_pretty)
self.assertEqual(len(serialized), 4572)
self.assertEqual(search_data_pretty, """
-36 symbols
+52 symbols
deprecated_macro [0]
|| | ($
|| | ) [1]