From 107a0e1a8211725f3c17c89c94bfa1e40d55f4bd Mon Sep 17 00:00:00 2001 From: Artem Goncharov Date: Wed, 27 Apr 2022 19:30:30 +0200 Subject: [PATCH] comment out code-block processing (#4) comment out code-block processing Reviewed-by: OpenTelekomCloud Bot --- otc_doc_convertor/convertor.py | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/otc_doc_convertor/convertor.py b/otc_doc_convertor/convertor.py index 44be6afe..8b28f924 100644 --- a/otc_doc_convertor/convertor.py +++ b/otc_doc_convertor/convertor.py @@ -179,22 +179,22 @@ class OTCDocConvertor: for li in soup.body.find_all("li"): del li['id'] - for pre in soup.body.find_all("pre"): - text = pre.get_text() - # if text.startswith("{"): - # pre["class"] = "data" - if re.search( - r'\[[a-z]*@\w+.*\][\s#>]?', - text - ): - # Something like "[root@ecs-test-0001 ~]#" - pre["class"] = "console" - elif re.match( - r'^(GET|PUT|POST|DELETE)', - text - ): - # Something like "DELETE https://some_url" - pre["class"] = "text" + # for pre in soup.body.find_all("pre"): + # text = pre.get_text() + # # if text.startswith("{"): + # # pre["class"] = "data" + # if re.search( + # r'\[[a-z]*@\w+.*\][\s#>]?', + # text + # ): + # # Something like "[root@ecs-test-0001 ~]#" + # pre["class"] = "console" + # elif re.match( + # r'^(GET|PUT|POST|DELETE)', + # text + # ): + # # Something like "DELETE https://some_url" + # pre["class"] = "text" # And now specialities rawize_strings = [