Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
always trim htmlToMarkdown output for consistency

Co-authored-by: Abdelhafidh Belalia <[email protected]>
  • Loading branch information
eh2077 and s77rt authored Mar 29, 2023
1 parent 2831da1 commit 8d5329f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libs/actions/Report.js
Original file line number Diff line number Diff line change
Expand Up @@ -829,7 +829,7 @@ const handleUserDeletedLinks = (newCommentText, originalHtml) => {
}
const htmlWithAutoLinks = parser.replace(newCommentText);
const markdownWithAutoLinks = parser.htmlToMarkdown(htmlWithAutoLinks).trim();
const markdownOriginalComment = parser.htmlToMarkdown(originalHtml);
const markdownOriginalComment = parser.htmlToMarkdown(originalHtml).trim();
const removedLinks = getRemovedMarkdownLinks(markdownOriginalComment, newCommentText);
return removeLinks(markdownWithAutoLinks, removedLinks);
};
Expand Down

0 comments on commit 8d5329f

Please sign in to comment.