提交 19098456 编写于 作者: X Xavier Noria

textilize titles in ToC of guides

上级 fefbddbf
...@@ -483,6 +483,9 @@ h6 { ...@@ -483,6 +483,9 @@ h6 {
font-size: 1em; font-size: 1em;
font-weight: normal; font-weight: normal;
} }
#subCol .chapters p {
font-size: 1em;
}
tt { tt {
font-family: monaco, "Bitstream Vera Sans Mono", "Courier New", courier, monospace; font-family: monaco, "Bitstream Vera Sans Mono", "Courier New", courier, monospace;
......
...@@ -82,11 +82,11 @@ def set_index(body, view) ...@@ -82,11 +82,11 @@ def set_index(body, view)
# Set index for 2 levels # Set index for 2 levels
i.level_hash.each do |key, value| i.level_hash.each do |key, value|
bookmark = '#' + key.gsub(/[^a-z0-9\-_\+]+/i, '').underscore.dasherize bookmark = '#' + key.gsub(/[^a-z0-9\-_\+]+/i, '').underscore.dasherize
link = view.content_tag(:a, :href => bookmark) { key } link = view.content_tag(:a, :href => bookmark) { textile(key) }
children = value.keys.map do |k| children = value.keys.map do |k|
bm = '#' + k.gsub(/[^a-z0-9\-_\+]+/i, '').underscore.dasherize bm = '#' + k.gsub(/[^a-z0-9\-_\+]+/i, '').underscore.dasherize
l = view.content_tag(:a, :href => bm) { k } l = view.content_tag(:a, :href => bm) { textile(k) }
view.content_tag(:li, l) view.content_tag(:li, l)
end end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册