Permalink
Browse files

Undo glitch in add_header_permalinks

Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information...
Kwpolska committed May 20, 2017
1 parent 0439676 commit 52371196c7408c23e1d85a8c54aeb4f5957de2ba
Showing with 3 additions and 1 deletion.
  1. +3 −1 nikola/filters.py
@@ -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')

0 comments on commit 5237119

Please sign in to comment.