Skip to content

Commit

Permalink
Undo glitch in add_header_permalinks
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information
Kwpolska committed May 20, 2017
1 parent 0439676 commit 5237119
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion nikola/filters.py
Expand Up @@ -441,7 +441,9 @@ def add_header_permalinks(fname, xpath_list=None, file_blacklist=None):

new_node = lxml.html.fragment_fromstring('<a href="#{0}" class="headerlink" title="Permalink to this heading">¶</a>'.format(hid))
node.append(new_node)
return lxml.html.tostring(doc, encoding="unicode")

with io.open(fname, 'w', encoding='utf-8') as outf:
outf.write(lxml.html.tostring(doc, encoding="unicode"))


@_ConfigurableFilter(top_classes='DEDUPLICATE_IDS_TOP_CLASSES')
Expand Down

0 comments on commit 5237119

Please sign in to comment.