mirror of
https://github.com/danbulant/api_docs
synced 2026-05-24 12:27:29 +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
|
module RedcarpetHeaderFix
|
||||||
def header(text, level, id)
|
def header(text, level, id)
|
||||||
clean_id = id.gsub(/[\.]/, '-').gsub(/[^a-zA-Z0-9\-_]/, '')
|
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
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue