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/assets/stylesheets/main.css | 5 +++-- guides/rails_guides/markdown.rb | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) (limited to 'guides') diff --git a/guides/assets/stylesheets/main.css b/guides/assets/stylesheets/main.css index bfd56a4578..a30e12fe7e 100644 --- a/guides/assets/stylesheets/main.css +++ b/guides/assets/stylesheets/main.css @@ -24,7 +24,7 @@ dl dt { font-weight: bold; } dd { margin-left: 1.5em;} pre,code { margin: 1.5em 0; overflow: auto; color: #222;} -pre,code,tt { +pre,code { font-size: 1em; font-family: "Anonymous Pro", "Inconsolata", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace; line-height: 1.5; @@ -156,6 +156,7 @@ a, a:link, a:visited { } #mainCol a, #subCol a, #feature a {color: #980905;} +#mainCol a code, #subCol a code, #feature a code {color: #980905;} /* Navigation @@ -400,7 +401,7 @@ div.code_container { margin: 0.25em 0 1.5em 0; } -.note tt, .info tt, .todo tt {border:none; background: none; padding: 0;} +.note code, .info code, .todo code {border:none; background: none; padding: 0;} #mainCol ul li { list-style:none; 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