[FIX] web_editor: inline space in source code

Backport of 57f7c68106
This commit is contained in:
Nicolas Lempereur
2018-05-11 11:06:05 +02:00
committed by qsm-odoo
parent 4431c8c843
commit 1dae7ea1d6
@@ -485,7 +485,12 @@ function prettify_html(html) {
level--;
}
result += token.trim().replace(/\s+/, ' ');
// don't trim inline content (which could change appearance)
if (!inline) {
token = token.trim();
}
result += token.replace(/\s+/, ' ');
if (inline_level > level) {
result += '\n';