Skip to content

Commit

Permalink
Transform literal blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
AA-Turner committed May 15, 2020
1 parent 2ee52fb commit e835f68
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions package.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,13 @@
tag.name = "tt"
[x.unwrap() if x.name else x for x in tag.contents]

for tag in contents.findAll("div", class_="highlight-default"):
tag.div.unwrap()
tag.pre.unwrap()
tag.name = "pre"
tag["class"] = "literal-block"
tag.string = "\n" + tag.text.strip() + "\n"

# Remove Sphinx Header
contents.h1.decompose()

Expand Down

0 comments on commit e835f68

Please sign in to comment.