diff --git a/spec/visual/app.rb b/spec/visual/app.rb index 71eff80a9a..7fd3cab313 100644 --- a/spec/visual/app.rb +++ b/spec/visual/app.rb @@ -89,7 +89,8 @@ def as_boolean(value) @raw = Rouge.highlight(@sample, 'plaintext', @formatter) @highlighted = Rouge.highlight(@sample, @lexer, @formatter) - erb :lexer + template = params[:juxtaposed] ? :lexer_juxtaposed : :lexer + erb template end diff --git a/spec/visual/templates/layout.erb b/spec/visual/templates/layout.erb index e02eb9f133..fbc1f2d70f 100644 --- a/spec/visual/templates/layout.erb +++ b/spec/visual/templates/layout.erb @@ -16,14 +16,13 @@ white-space: pre-wrap; } a { text-decoration: none } - + header { + color: <%= @comment_color %>; + border-bottom: 1px dotted + } #page-header, #page-footer { padding: 15px; text-align: center; - color: <%= @comment_color %> - } - #page-header { - border-bottom: 1px dotted } #page-header h1 { margin: 0.25em; @@ -32,10 +31,9 @@ .section-header { margin-bottom: 20px; padding-bottom: 8px; - color: <%= @comment_color %>; - border-bottom: 1px dotted } #page-footer { + color: <%= @comment_color %>; border-top: 1px dotted } .rouge-line-table { border-collapse: collapse } diff --git a/spec/visual/templates/lexer.erb b/spec/visual/templates/lexer.erb index be00d16410..c9ac358044 100644 --- a/spec/visual/templates/lexer.erb +++ b/spec/visual/templates/lexer.erb @@ -7,9 +7,9 @@ } .legend { + float: right; padding: 15px; padding-left: 0; - float: right; width: 250px; } @@ -17,12 +17,13 @@ <%= @lexer.class.tag %> lexer visual test + Highlighted <%= @highlighted %> Raw - <%= @raw %> + <%= @raw %>
<%= @raw %>