Skip to content

Commit

Permalink
Fix incorrect header nesting in redcarpet patch
Browse files Browse the repository at this point in the history
Spotted by @moizjv, thanks!
  • Loading branch information
lord committed Jul 10, 2014
1 parent 60d1dbd commit 052036b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/redcarpet_header_fix.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module RedcarpetHeaderFix
def header(text, level, id)
clean_id = id.gsub(/[\.]/, '-').gsub(/[^a-zA-Z0-9\-_]/, '')
"<h#{level} id='#{clean_id}'>#{text}</h1>"
"<h#{level} id='#{clean_id}'>#{text}</h#{level}>"
end
end

Expand Down

0 comments on commit 052036b

Please sign in to comment.