diff --git a/dev/Common/Html.js b/dev/Common/Html.js index 959286c54..c9bd57c92 100644 --- a/dev/Common/Html.js +++ b/dev/Common/Html.js @@ -95,9 +95,7 @@ export const ]; tpl.innerHTML = html - .replace(/(
]*>)([\s\S]*?)(<\/pre>)/gi, aMatches => { - return (aMatches[1] + aMatches[2].trim() + aMatches[3].trim()).replace(/\r?\n/g, '
'); - }) +// .replace(/]*>[\s\S]*?<\/pre>/gi, pre => pre.replace(/\n/g, '\n
')) .replace(/]*>/gi, '') .replace(/<\?xml[^>]*\?>/gi, '') // Not supported by element diff --git a/dev/Styles/User/SquireUI.less b/dev/Styles/User/SquireUI.less index ee4976d5f..72f290898 100644 --- a/dev/Styles/User/SquireUI.less +++ b/dev/Styles/User/SquireUI.less @@ -64,16 +64,14 @@ } pre, code { - margin: 0; - padding: 0; - background: #fff; border: none; border-radius: 0; - font-family: var(--fontMono); display: block; + font-family: var(--fontMono); + margin: 0; + padding: 0; word-break: normal; word-wrap: break-word; - background-color: #f9f9f9; } code { @@ -82,9 +80,8 @@ } pre { - padding: 5px 10px; border-radius: 5px; - background-color: #f9f9f9; + padding: 5px 10px; } pre > code { diff --git a/snappymail/v/0.0.0/app/libraries/MailSo/Base/HtmlUtils.php b/snappymail/v/0.0.0/app/libraries/MailSo/Base/HtmlUtils.php index efd75b43e..5bb1cd726 100644 --- a/snappymail/v/0.0.0/app/libraries/MailSo/Base/HtmlUtils.php +++ b/snappymail/v/0.0.0/app/libraries/MailSo/Base/HtmlUtils.php @@ -222,7 +222,7 @@ abstract class HtmlUtils } return '' - . \MailSo\Base\Utils::StripSpaces($oDoc->saveHTML($oBody)) . ''; + . $oDoc->saveHTML($oBody) . '