Skip to content

Commit

Permalink
- Re-arrange processing of newlines
Browse files Browse the repository at this point in the history
- Remove styling that causes inline-block div that produces problem
  • Loading branch information
martgil committed May 27, 2024
1 parent d4c6c45 commit 32d2dc2
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ export class ComposeQuoteModule extends ViewModule<ComposeView> {
private convertLineBreakToBr = (text: string, shouldQuote: boolean) => {
return text
.split('\n')
.map(line => `<br>${shouldQuote ? '&gt; ' : ''}${line}`.trim())
.map(line => `${shouldQuote ? '&gt; ' : ''}${line}<br>`.trim())
.join('');
};

Expand All @@ -213,9 +213,9 @@ export class ComposeQuoteModule extends ViewModule<ComposeView> {
const dirAttr = `dir="${rtl ? 'rtl' : 'ltr'}"`;
const escapedText = this.convertLineBreakToBr(Xss.escape(text), method === 'reply');
if (method === 'reply') {
const header = `<div ${dirAttr} style="display: inline-block">On ${dateStr}, ${from ?? ''} wrote:</div>`;
const header = `<div ${dirAttr}>On ${dateStr}, ${from ?? ''} wrote:</div>`;
const sanitizedQuote = Xss.htmlSanitize(header + escapedText);
return `<blockquote ${dirAttr}}>${sanitizedQuote}</blockquote>`;
return `<blockquote ${dirAttr}>${sanitizedQuote}</blockquote>`;
} else {
const header =
`<div ${dirAttr}>` +
Expand Down

0 comments on commit 32d2dc2

Please sign in to comment.