forked from laiweijian4/doc-exports
comment out code-block processing (#4)
comment out code-block processing Reviewed-by: OpenTelekomCloud Bot <None>
This commit is contained in:
parent
3196b64bfc
commit
107a0e1a82
@ -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 = [
|
||||||
|
Loading…
x
Reference in New Issue
Block a user