I'm building a tech blog that has code examples in the articles using Angular, Node.js and MongoDB, I'm storing the post bodies in an html format. When I store a post the code snippets indentations and line breaks are being replaced by whitespaces. I can't find a way to store them and display them the way I want.
Expectations
body {
color: #ffffff;
}
What I get
body { color: #ffffff; }
Btw I'm using Prism.js as a syntax highlighter.