comment out code-block processing (#4)

comment out code-block processing

Reviewed-by: OpenTelekomCloud Bot <None>
This commit is contained in:
Artem Goncharov 2022-04-27 19:30:30 +02:00 committed by GitHub
parent 3196b64bfc
commit 107a0e1a82
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 = [