Skip to content
Snippets Groups Projects
Commit 99a94896 authored by Arnaud Levy's avatar Arnaud Levy
Browse files

Fix linebreaks in code

parent fcaf1277
No related branches found
No related tags found
No related merge requests found
......@@ -4,7 +4,7 @@ class Static::Code < Static::Default
unless @prepared
@prepared = @text.to_s.dup
@prepared = lazy_load_iframes @prepared
@prepared = turn_linebreak_to_br @prepared
@prepared = remove_linebreak @prepared
@prepared = raw @prepared
end
@prepared
......
......@@ -40,4 +40,11 @@ class Static::Default
text
end
def remove_linebreak(text)
text.gsub! "\r\n", ""
text.gsub! "\r", ""
text.gsub! "\n", ""
text
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment