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"): for li in soup.body.find_all("li"):
del li['id'] del li['id']
for pre in soup.body.find_all("pre"): # for pre in soup.body.find_all("pre"):
text = pre.get_text() # text = pre.get_text()
# if text.startswith("{"): # # if text.startswith("{"):
# pre["class"] = "data" # # pre["class"] = "data"
if re.search( # if re.search(
r'\[[a-z]*@\w+.*\][\s#>]?', # r'\[[a-z]*@\w+.*\][\s#>]?',
text # text
): # ):
# Something like "[root@ecs-test-0001 ~]#" # # Something like "[root@ecs-test-0001 ~]#"
pre["class"] = "console" # pre["class"] = "console"
elif re.match( # elif re.match(
r'^(GET|PUT|POST|DELETE)', # r'^(GET|PUT|POST|DELETE)',
text # text
): # ):
# Something like "DELETE https://some_url" # # Something like "DELETE https://some_url"
pre["class"] = "text" # pre["class"] = "text"
# And now specialities # And now specialities
rawize_strings = [ rawize_strings = [