From 5a4622b8b8aad53361b281583f587a39611e7aa3 Mon Sep 17 00:00:00 2001 From: Prem Sichanugrist Date: Mon, 3 Sep 2012 21:21:04 -0400 Subject: Retain heading styles in the page chapters list --- guides/rails_guides/markdown.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'guides/rails_guides') 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 -- cgit v1.2.3