mirror of
https://github.com/danbulant/api_docs
synced 2026-05-19 04:08:40 +00:00
Fix incorrect header nesting in redcarpet patch
Spotted by @moizjv, thanks!
This commit is contained in:
parent
60d1dbd37d
commit
052036b0c2
1 changed files with 1 additions and 1 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue