Wrap custom id of a header attribute into \" in rails guides
Related to https://github.com/rails/rails/pull/33953
This commit is contained in:
parent
92be3848f9
commit
b5b55fbde8
|
@ -31,7 +31,7 @@ HTML
|
||||||
|
|
||||||
header_with_id = text.scan(/(.*){#(.*)}/)
|
header_with_id = text.scan(/(.*){#(.*)}/)
|
||||||
unless header_with_id.empty?
|
unless header_with_id.empty?
|
||||||
%(<h#{header_level} id=#{header_with_id[0][1].strip}>#{header_with_id[0][0].strip}</h#{header_level}>)
|
%(<h#{header_level} id="#{header_with_id[0][1].strip}">#{header_with_id[0][0].strip}</h#{header_level}>)
|
||||||
else
|
else
|
||||||
%(<h#{header_level}>#{text}</h#{header_level}>)
|
%(<h#{header_level}>#{text}</h#{header_level}>)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue