Fix some encoding issues with sphinx docs in htmlhelp builder

This commit is contained in:
baldurk
2020-03-09 10:53:25 +00:00
parent baa7adea30
commit 5cd04f27a0
3 changed files with 6 additions and 0 deletions
+1
View File
@@ -147,6 +147,7 @@ if [ $1 == "htmlhelp" ]; then
# Copy introduction page over index.html
cp $BUILDDIR/htmlhelp/introduction.html $BUILDDIR/htmlhelp/index.html
# Filter out the auto-generated TOC to remove anchor links and root index.html
cp $BUILDDIR/htmlhelp/renderdoc.hhc $BUILDDIR/htmlhelp/renderdoc.hhc.bak
cat $BUILDDIR/htmlhelp/renderdoc.hhc | "$PYTHON" remove_lines.py ".html#" | "$PYTHON" remove_lines.py "\"index.html\"" > $BUILDDIR/htmlhelp/tmp
mv $BUILDDIR/htmlhelp/tmp $BUILDDIR/htmlhelp/renderdoc.hhc
if [ -f "${HHCBUILD}" ]; then
+3
View File
@@ -14,6 +14,9 @@ def remLines(delim, above, below):
WinReader = codecs.getreader('cp1252')
sys.stdin = WinReader(sys.stdin.buffer)
WinWriter = codecs.getwriter('cp1252')
sys.stdout = WinWriter(sys.stdout.buffer)
buff = []
line = sys.stdin.readline()
while line:
@@ -11,7 +11,9 @@
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
{% if 'htmlhelp' not in builder %}
<meta charset="utf-8">
{% endif %}
{{ metatags }}
<meta name="viewport" content="width=device-width, initial-scale=1.0">
{% block htmltitle %}