Skip to content

Commit

Permalink
added docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
Roberto Alsina committed May 4, 2017
1 parent fc26192 commit 461e3b0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions nikola/filters.py
Expand Up @@ -396,6 +396,7 @@ def _normalize_html(data):

@apply_to_text_file
def add_header_permalinks(data):
"""Post-process HTML via lxml to add header permalinks Sphinx-style."""
doc = lxml.html.document_fromstring(data)
for h in ['h1', 'h2', 'h3', 'h4']:
nodes = doc.findall('*//%s' % h)
Expand Down

0 comments on commit 461e3b0

Please sign in to comment.