Skip to content

Commit

Permalink
Fixed another rendering issue on gh-pages
Browse files Browse the repository at this point in the history
Signed-off-by: MaFeLP <60669873+MaFeLP@users.noreply.github.com>
  • Loading branch information
MaFeLP committed Oct 5, 2021
1 parent 3fc3042 commit 69c57d7
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions prepare_pages.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,17 @@ def replace_tables(_text: str) -> str:


def get_header(url):
header_end = r'<p><a href="https://github.com/lxgr-linux/pokete/actions/workflows/main.yml"><img src="https://github.com/lxgr-linux/pokete/actions/workflows/main.yml/badge.svg" alt="Wiki" /></a>'
header_end = r'<section>'
result = request.urlopen(url)
_text = result.read().decode('UTF-8').split(header_end)[0]
return _text + header_end + '\n'


def get_footer(url):
footer_start = '<footer>'
result = request.urlopen(url)
_text = result.read().decode('UTF-8').split("<footer")[1]
_text = '<footer>' + _text
_text = result.read().decode('UTF-8').split(footer_start)[1]
_text = footer_start + _text
return _text


Expand Down

0 comments on commit 69c57d7

Please sign in to comment.