Update ToC to preserve italics, see #551

This commit is contained in:
Robert Lord 2017-02-24 12:06:55 -06:00
parent 53e2f23e5c
commit f7d1bd1da5

View file

@ -8,7 +8,7 @@ def toc_data(page_content)
html_doc.css('h1, h2, h3').each do |header| html_doc.css('h1, h2, h3').each do |header|
headers.push({ headers.push({
id: header.attribute('id').to_s, id: header.attribute('id').to_s,
content: header.content, content: header.children,
level: header.name[1].to_i, level: header.name[1].to_i,
children: [] children: []
}) })