if not ref_name:
ref_name = symbol.lower()
- if replace_underscores:
+ # c-type references don't support hash
+ if ref_type == ":ref" and replace_underscores:
ref_name = ref_name.replace("_", "-")
ref_link = f"{ref_type}:`{symbol} <{ref_name}>`"
if match:
name = match.group(2).strip()
symbol = match.group(3)
- self.store_type("typedef", symbol, ref_name=name,
- replace_underscores=False)
+ self.store_type("typedef", symbol, ref_name=name)
continue
for re_enum in self.RE_ENUMS:
for re_struct in self.RE_STRUCTS:
match = re_struct.match(line)
if match:
- self.store_type("struct", match.group(1),
- replace_underscores=False)
+ self.store_type("struct", match.group(1))
break
def process_exceptions(self, fname: str):