aboutsummaryrefslogtreecommitdiffstats
path: root/guides/rails_guides
diff options
context:
space:
mode:
authorPrem Sichanugrist <s@sikachu.com>2012-09-03 21:21:04 -0400
committerPrem Sichanugrist <s@sikac.hu>2012-09-17 15:54:23 -0400
commit5a4622b8b8aad53361b281583f587a39611e7aa3 (patch)
treedd86a3ddc24c87d5411e3ea0ca4bf06fbf59edb4 /guides/rails_guides
parentf35187be2218cc5f6b5a454f2dffce1cd6bbe8a0 (diff)
downloadrails-5a4622b8b8aad53361b281583f587a39611e7aa3.tar.gz
rails-5a4622b8b8aad53361b281583f587a39611e7aa3.tar.bz2
rails-5a4622b8b8aad53361b281583f587a39611e7aa3.zip
Retain heading styles in the page chapters list
Diffstat (limited to 'guides/rails_guides')
-rw-r--r--guides/rails_guides/markdown.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/guides/rails_guides/markdown.rb b/guides/rails_guides/markdown.rb
index 8a974cdf2c..0b89c05bf1 100644
--- a/guides/rails_guides/markdown.rb
+++ b/guides/rails_guides/markdown.rb
@@ -65,11 +65,11 @@ module RailsGuides
when 'h3'
hierarchy = [node]
node[:id] = dom_id(hierarchy)
- @raw_index += "1. [#{node.text}](##{node[:id]})\n"
+ @raw_index += "1. [#{node.inner_html}](##{node[:id]})\n"
when 'h4'
hierarchy = hierarchy[0, 1] + [node]
node[:id] = dom_id(hierarchy)
- @raw_index += " * [#{node.text}](##{node[:id]})\n"
+ @raw_index += " * [#{node.inner_html}](##{node[:id]})\n"
when 'h5'
hierarchy = hierarchy[0, 2] + [node]
node[:id] = dom_id(hierarchy)
@@ -78,7 +78,7 @@ module RailsGuides
node[:id] = dom_id(hierarchy)
end
- node.inner_html = "#{node_index(hierarchy)} #{node.text}"
+ node.inner_html = "#{node_index(hierarchy)} #{node.inner_html}"
end
end
end.to_html