1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Merge pull request #34083 from bogdanvlviv/follow-up-33953

Wrap custom id of a header attribute into \" in rails guides
This commit is contained in:
Ryuta Kamizono 2018-10-05 07:45:38 +09:00 committed by GitHub
commit c37247e187
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -31,7 +31,7 @@ HTML
header_with_id = text.scan(/(.*){#(.*)}/)
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
%(<h#{header_level}>#{text}</h#{header_level}>)
end