提交 7d773a17 编写于 作者: X Xavier Noria

fixes scroll beyond the box in code blocks (fix suggested by toretore)

上级 d5fb5791
......@@ -369,11 +369,14 @@ tt {
font-size: 0.9em;
}
div.code_container {
background: #EEE url(../../images/tab_grey.gif) no-repeat left top;
padding: 0.25em 1em 0.5em 48px;
}
code {
font-family: monaco, "Bitstream Vera Sans Mono", "Courier New", courier, monospace;
background: #EEE url(../../images/tab_grey.gif) no-repeat left top;
border: none;
padding: 0.25em 1em 0.5em 48px;
margin: 0.25em 0 1.5em 0;
display: block;
}
......
......@@ -34,7 +34,7 @@ def code(body)
body.gsub!(/\<(yaml|shell|ruby|erb|html|sql)\>(.*?)\<\/\1\>/m) do |m|
es = ERB::Util.h($2)
css_class = ['erb', 'shell'].include?($1) ? 'html' : $1
"<notextile><code class='#{css_class}'>#{es}\n</code></notextile>"
%{<notextile><div class="code_container"><code class="#{css_class}">#{es}\n</code></div></notextile>}
end
end
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册