diff options
author | Prem Sichanugrist <s@sikachu.com> | 2012-09-03 21:21:04 -0400 |
---|---|---|
committer | Prem Sichanugrist <s@sikac.hu> | 2012-09-17 15:54:23 -0400 |
commit | 5a4622b8b8aad53361b281583f587a39611e7aa3 (patch) | |
tree | dd86a3ddc24c87d5411e3ea0ca4bf06fbf59edb4 /guides | |
parent | f35187be2218cc5f6b5a454f2dffce1cd6bbe8a0 (diff) | |
download | rails-5a4622b8b8aad53361b281583f587a39611e7aa3.tar.gz rails-5a4622b8b8aad53361b281583f587a39611e7aa3.tar.bz2 rails-5a4622b8b8aad53361b281583f587a39611e7aa3.zip |
Retain heading styles in the page chapters list
Diffstat (limited to 'guides')
-rw-r--r-- | guides/assets/stylesheets/main.css | 5 | ||||
-rw-r--r-- | guides/rails_guides/markdown.rb | 6 |
2 files changed, 6 insertions, 5 deletions
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 |