unwrap content of table with linenums

Reviewed-by: Kucerak, Kristian <kristian.kucerak@t-systems.com>
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com>
Co-authored-by: gtema <artem.goncharov@gmail.com>
Co-committed-by: gtema <artem.goncharov@gmail.com>
This commit is contained in:
gtema 2022-10-04 11:47:02 +00:00 committed by zuul
parent c83f1e753b
commit 048ba53a31

View File

@ -261,6 +261,9 @@ class OTCDocConvertor:
table = td_lines.find_parent("table")
if codeblock and table:
# Replace whole table with only codeblock td
logging.debug("Replace %s with %s" % (table, codeblock))
codeblock.name = "pre"
del codeblock["class"]
table.replace_with(codeblock)
for pre in soup.body.find_all("pre"):