From 048ba53a31d4d901de56f82fac25f7a7c43badaf Mon Sep 17 00:00:00 2001 From: gtema Date: Tue, 4 Oct 2022 11:47:02 +0000 Subject: [PATCH] unwrap content of table with linenums Reviewed-by: Kucerak, Kristian Reviewed-by: Hasko, Vladimir Co-authored-by: gtema Co-committed-by: gtema --- otc_doc_convertor/convertor.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/otc_doc_convertor/convertor.py b/otc_doc_convertor/convertor.py index 27d1532bc..7a10eb5a9 100644 --- a/otc_doc_convertor/convertor.py +++ b/otc_doc_convertor/convertor.py @@ -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"):