Permalink
Browse files

Retain heading styles in the page chapters list

  • Loading branch information...
1 parent f35187b commit 5a4622b8b8aad53361b281583f587a39611e7aa3 @sikachu sikachu committed with sikachu Sep 4, 2012
Showing with 6 additions and 5 deletions.
  1. +3 −2 guides/assets/stylesheets/main.css
  2. +3 −3 guides/rails_guides/markdown.rb
@@ -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;
@@ -65,11 +65,11 @@ def generate_structure
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 @@ def generate_structure
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

0 comments on commit 5a4622b

Please sign in to comment.