diff --git a/frontend/src/components/Editor.vue b/frontend/src/components/Editor.vue index a0a333b6..54793f5a 100644 --- a/frontend/src/components/Editor.vue +++ b/frontend/src/components/Editor.vue @@ -375,7 +375,7 @@ export default { beautifyHTML(str) { // Pad all tags with linebreaks. - let s = this.trimLines(str.replace(/(<([^>]+)>)/ig, '\n$1\n'), true); + let s = this.trimLines(str.replace(/(<(?!(\/)?a|span)([^>]+)>)/ig, '\n$1\n'), true); // Remove extra linebreaks. s = s.replace(/\n+/g, '\n');