Skip to content

Commit 4a947cf

Browse files
committed
FIX: workaround py2 unicode issues
9a8ed26 backported #7436 which fixed a warning about non explicitly encoded non-ascii characters. This 'just works' on python3, but we need to explicitly make the string with the unicode (¶ for the links) as unicode for py2. We can not use `from __future__ import unicode_literals` due to issues with shpinx expecting bytes (str) not unicode.
1 parent 51f53fb commit 4a947cf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

doc/sphinxext/gen_gallery.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# -*- coding: UTF-8 -*-
1+
# -*- coding: utf-8 -*-
22
import codecs
33
import os
44
import re
@@ -35,7 +35,7 @@
3535
{{% endblock %}}
3636
"""
3737

38-
header_template = """\
38+
header_template = u"""\
3939
<div class="section" id="{section}">
4040
<h4>
4141
{title}<a class="headerlink" href="#{section}" title="Permalink to this headline">¶</a>

0 commit comments

Comments
 (0)