mirror of
https://github.com/element-hq/element-web.git
synced 2024-12-03 20:36:57 +03:00
Update comment
This commit is contained in:
parent
eeb1c33868
commit
9b24f70d00
1 changed files with 2 additions and 3 deletions
|
@ -99,9 +99,8 @@ export function processHtmlForSending(html: string): string {
|
|||
if (element.tagName.toLowerCase() === 'p') {
|
||||
contentHTML += element.innerHTML + '<br />';
|
||||
} else if (element.tagName.toLowerCase() === 'pre') {
|
||||
// Replace "<br>\n" with "<br>" because the \n is redundant and causes an
|
||||
// extra newline per line within `<pre>` tags.
|
||||
// This is a workaround for a bug in draft-js-export-html:
|
||||
// Replace "<br>\n" with "\n" within `<pre>` tags because the <br> is
|
||||
// redundant. This is a workaround for a bug in draft-js-export-html:
|
||||
// https://github.com/sstur/draft-js-export-html/issues/62
|
||||
contentHTML += '<pre>' +
|
||||
element.innerHTML.replace(/<br>\n/g, '\n').trim() +
|
||||
|
|
Loading…
Reference in a new issue