From 7d773a17a48376f1ccc0b7ea148625acc421b396 Mon Sep 17 00:00:00 2001 From: Xavier Noria Date: Wed, 25 Feb 2009 00:59:37 +0100 Subject: [PATCH] fixes scroll beyond the box in code blocks (fix suggested by toretore) --- railties/guides/files/stylesheets/main.css | 7 +++++-- railties/guides/rails_guides/textile_extensions.rb | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/railties/guides/files/stylesheets/main.css b/railties/guides/files/stylesheets/main.css index de6e26647b..1e006adf6e 100644 --- a/railties/guides/files/stylesheets/main.css +++ b/railties/guides/files/stylesheets/main.css @@ -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; } diff --git a/railties/guides/rails_guides/textile_extensions.rb b/railties/guides/rails_guides/textile_extensions.rb index 7ebbf0090e..460dab18c3 100644 --- a/railties/guides/rails_guides/textile_extensions.rb +++ b/railties/guides/rails_guides/textile_extensions.rb @@ -34,7 +34,7 @@ module RailsGuides 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 - "#{es}\n" + %{
#{es}\n
} end end end