mirror of
https://github.com/element-hq/element-web.git
synced 2024-12-12 03:26:56 +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') {
|
if (element.tagName.toLowerCase() === 'p') {
|
||||||
contentHTML += element.innerHTML + '<br />';
|
contentHTML += element.innerHTML + '<br />';
|
||||||
} else if (element.tagName.toLowerCase() === 'pre') {
|
} else if (element.tagName.toLowerCase() === 'pre') {
|
||||||
// Replace "<br>\n" with "<br>" because the \n is redundant and causes an
|
// Replace "<br>\n" with "\n" within `<pre>` tags because the <br> is
|
||||||
// extra newline per line within `<pre>` tags.
|
// redundant. This is a workaround for a bug in draft-js-export-html:
|
||||||
// This is a workaround for a bug in draft-js-export-html:
|
|
||||||
// https://github.com/sstur/draft-js-export-html/issues/62
|
// https://github.com/sstur/draft-js-export-html/issues/62
|
||||||
contentHTML += '<pre>' +
|
contentHTML += '<pre>' +
|
||||||
element.innerHTML.replace(/<br>\n/g, '\n').trim() +
|
element.innerHTML.replace(/<br>\n/g, '\n').trim() +
|
||||||
|
|
Loading…
Reference in a new issue