Here’s my sinatra code:
get '/' do
foo = 'not bar'
erb :index
end
My layout.erb
<html>
<head></head>
<body>
<%= yield %>
</body>
</html>
My index.erb
<div class="container">
</div>
now the problem is

The extra text (hilighted with yellow) disturbs my design
Any idea why this is happening?
this dosn’t happen if I dont use layout and use only index.erb with all html code
[Edit:]
Use of <%= yield -%> throws error (unexpected tUMINUS, expecting kEND ; @_out_buf.concat ” “; – yield -; @_out_buf.concat “\n” ) in …. layout.rb
my best guess is the 4 spaces come from the soft tabs in your layout.erb
try
<body><%= yield%></body>?I’ve been using Slim a long while
and
never fails me whitespace
hate ERB