I am using CodeRay version 1.1.1 to render a ruby file. However, it is adding a large number of extra spaces to indent all lines except the first line.
As a MCVE, I have a file called something.rb with contents:
# This comment will not be indented
# This comment WILL be indented
In the controller I have:
contents = File.read('something.rb')
@syntax_highlighted = CodeRay.scan(contents, :ruby).div
And in the view, I have
= raw @syntax_highlighted