Escape " in headers

This commit is contained in:
bootstraponline
2012-10-14 22:19:52 -06:00
parent 82913cea20
commit 87c08f5613
2 changed files with 7 additions and 6 deletions
+2 -1
View File
@@ -95,7 +95,8 @@ module Gollum
def process_headers(doc)
toc = nil
doc.css('h1,h2,h3,h4,h5,h6').each do |h|
h_name = h.content.gsub(' ','-')
# must escape "
h_name = h.content.gsub(' ','-').gsub('"','%22')
level = h.name.gsub(/[hH]/,'').to_i