diff --git a/docs/cudf/source/conf.py b/docs/cudf/source/conf.py index b997c78fba8..a0bb555365e 100644 --- a/docs/cudf/source/conf.py +++ b/docs/cudf/source/conf.py @@ -109,12 +109,12 @@ def clean_definitions(root): # All of these in type declarations cause Breathe to choke. # For friend, see https://github.com/breathe-doc/breathe/issues/916 strings_to_remove = ("__forceinline__", "CUDF_HOST_DEVICE", "decltype(auto)", "friend") - for field in (".//type", ".//definition"): - for type_ in root.findall(field): - if type_.text is not None: - for string in strings_to_remove: - type_.text = type_.text.replace(string, "") - + for node in root.iter(): + for string in strings_to_remove: + if node.text is not None: + node.text = node.text.replace(string, "") + if node.tail is not None: + node.tail = node.tail.replace(string, "") def clean_all_xml_files(path): for fn in glob.glob(os.path.join(path, "*.xml")):