mirror of
https://github.com/knadh/listmonk.git
synced 2025-01-04 13:20:17 +08:00
Fix editor HTML beautification in incorrectly adding breaks to links.
Closes #655
This commit is contained in:
parent
6a5ed43275
commit
636db204fc
1 changed files with 1 additions and 1 deletions
|
@ -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');
|
||||
|
|
Loading…
Reference in a new issue