Skip to content

Commit

Permalink
apply prettier formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
honnamkuan committed May 12, 2023
1 parent 20cbe50 commit aa8d418
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
5 changes: 1 addition & 4 deletions src/libs/ReportActionsUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,10 +158,7 @@ function getLastVisibleMessageText(reportID, actionsToMerge = {}) {
const htmlText = lodashGet(lastVisibleAction, 'message[0].html', '');
const parser = new ExpensiMark();
const messageText = parser.htmlToText(htmlText);
return String(messageText)
.replace(CONST.REGEX.AFTER_FIRST_LINE_BREAK, '')
.substring(0, CONST.REPORT.LAST_MESSAGE_TEXT_MAX_LENGTH)
.trim();
return String(messageText).replace(CONST.REGEX.AFTER_FIRST_LINE_BREAK, '').substring(0, CONST.REPORT.LAST_MESSAGE_TEXT_MAX_LENGTH).trim();
}

/**
Expand Down
5 changes: 1 addition & 4 deletions src/libs/ReportUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -530,10 +530,7 @@ function canShowReportRecipientLocalTime(personalDetails, report) {
* @returns {String}
*/
function formatReportLastMessageText(lastMessageText) {
return Str.htmlDecode(String(lastMessageText))
.replace(CONST.REGEX.AFTER_FIRST_LINE_BREAK, '')
.substring(0, CONST.REPORT.LAST_MESSAGE_TEXT_MAX_LENGTH)
.trim();
return Str.htmlDecode(String(lastMessageText)).replace(CONST.REGEX.AFTER_FIRST_LINE_BREAK, '').substring(0, CONST.REPORT.LAST_MESSAGE_TEXT_MAX_LENGTH).trim();
}

/**
Expand Down

0 comments on commit aa8d418

Please sign in to comment.