summaryrefslogtreecommitdiff
path: root/sphinx/writers/html5.py
diff options
context:
space:
mode:
Diffstat (limited to 'sphinx/writers/html5.py')
-rw-r--r--sphinx/writers/html5.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/sphinx/writers/html5.py b/sphinx/writers/html5.py
index 288954493..37583ae75 100644
--- a/sphinx/writers/html5.py
+++ b/sphinx/writers/html5.py
@@ -54,7 +54,7 @@ class HTML5Translator(SphinxTranslator, BaseTranslator):
self.permalink_text = self.config.html_add_permalinks
# support backwards-compatible setting to a bool
if not isinstance(self.permalink_text, str):
- self.permalink_text = self.permalink_text and u'\u00B6' or ''
+ self.permalink_text = self.permalink_text and '\u00B6' or ''
self.permalink_text = self.encode(self.permalink_text)
self.secnumber_suffix = self.config.html_secnumber_suffix
self.param_separator = ''
@@ -294,7 +294,7 @@ class HTML5Translator(SphinxTranslator, BaseTranslator):
def append_fignumber(figtype, figure_id):
# type: (str, str) -> None
if self.builder.name == 'singlehtml':
- key = u"%s/%s" % (self.docnames[-1], figtype)
+ key = "%s/%s" % (self.docnames[-1], figtype)
else:
key = figtype
@@ -320,7 +320,7 @@ class HTML5Translator(SphinxTranslator, BaseTranslator):
def add_permalink_ref(self, node, title):
# type: (nodes.Element, str) -> None
if node['ids'] and self.permalink_text and self.builder.add_permalinks:
- format = u'<a class="headerlink" href="#%s" title="%s">%s</a>'
+ format = '<a class="headerlink" href="#%s" title="%s">%s</a>'
self.body.append(format % (node['ids'][0], title, self.permalink_text))
# overwritten
@@ -349,9 +349,9 @@ class HTML5Translator(SphinxTranslator, BaseTranslator):
if close_tag.startswith('</h'):
self.add_permalink_ref(node.parent, _('Permalink to this headline'))
elif close_tag.startswith('</a></h'):
- self.body.append(u'</a><a class="headerlink" href="#%s" ' %
+ self.body.append('</a><a class="headerlink" href="#%s" ' %
node.parent['ids'][0] +
- u'title="%s">%s' % (
+ 'title="%s">%s' % (
_('Permalink to this headline'),
self.permalink_text))
elif isinstance(node.parent, nodes.table):
@@ -775,7 +775,7 @@ class HTML5Translator(SphinxTranslator, BaseTranslator):
self._table_row_index = 0
- classes = [cls.strip(u' \t\n') for cls in self.settings.table_style.split(',')]
+ classes = [cls.strip(' \t\n') for cls in self.settings.table_style.split(',')]
classes.insert(0, "docutils") # compat
if 'align' in node:
classes.append('align-%s' % node['align'])