Skip to content

Commit e71ae9c

Browse files
committed
preprocess: Remove more invisible elements
1 parent 186dfd5 commit e71ae9c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

preprocess.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,8 +175,10 @@ def preprocess_html_file(root, fn, rename_map):
175175
html = etree.parse(fn, parser)
176176

177177
# remove non-printable elements
178-
for el in html.xpath('//*[@class]'):
179-
if has_class(el, ['noprint']):
178+
for el in html.xpath('//*'):
179+
if has_class(el, ['noprint', 'editsection']):
180+
el.getparent().remove(el)
181+
if el.get('id') == 'toc':
180182
el.getparent().remove(el)
181183

182184
# remove see also links between C and C++ documentations

0 commit comments

Comments
 (0)