"Code" style not saving properly (line breaks disappear)

Permalink
Hi,

I tried to use the "Code" style in my Elemental-themed concrete5 instance to wrap code snippets as part of a tutorial. But I can't get the Content blocks to be saved properly: all my line breaks disappear and I find myself looking at my long code forced to a single line :(
The exact code I want to put in is the second one on this page:http://dev.deluge-torrent.org/wiki/UserGuide/Service/DebianUbuntuIn...

Here is what happens :
1. In a newly created Content block, if I copy and paste the code, it is automatically pasted into a single line, in Code style ...
2. From the situation in #1, if I manually add line breaks (by pressing enter) and click on Save, it is saved again as a single line ...
3 From the situation in #1, if I select all the text, apply the "Normal text" style to it, manually add line breaks, the line breaks are successfully saved.
4. Now from the situation in #3, if I choose "Edit block" again, add line breaks and save the block, it is saved again in a single line !!

This drives me nuts. What could cause that? Is it a generalized bug ?

I'm using the Elemental Theme on 5.7.4.2 recently updated from 5.7.3.1 (I had never used Code style before the update)

 
MrKDilkington replied on at Permalink Best Answer Reply
MrKDilkington
Hi tmlmt,

The Content block does not handle code formatting properly.

I recommend using an HTML block and pasting the code inside <pre> tags.
Example:
<pre>
your code
</pre>

By the way, in the near future I will have a free code block on the marketplace that supports syntax highlighting.
tmlmt replied on at Permalink Reply
Hi MrKDilkington,

Thanks for your reply! Glad I'm not doing anything wrong, but it's a pity to have to use HTML blocks. Writing a dev tutorial (pretty basic thing to do in a blog) in a mode as close to WYSIWYG as possible would imply switching many times between Content and HTML blocks ...

Looking forward to your syntax highlighting add-on