summaryrefslogtreecommitdiff
path: root/addons/web_editor/static/src/js/rte.summernote.js
diff options
context:
space:
mode:
Diffstat (limited to 'addons/web_editor/static/src/js/rte.summernote.js')
-rw-r--r--addons/web_editor/static/src/js/rte.summernote.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/addons/web_editor/static/src/js/rte.summernote.js b/addons/web_editor/static/src/js/rte.summernote.js
index 25d966b354d..123b5560424 100644
--- a/addons/web_editor/static/src/js/rte.summernote.js
+++ b/addons/web_editor/static/src/js/rte.summernote.js
@@ -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';