Skip to content

Commit fd0ea27

Browse files
committed
Simplify iouComment normalization comment per review
1 parent 02b442a commit fd0ea27

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

src/components/MoneyRequestConfirmationList/sections/DescriptionField.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,8 @@ function DescriptionField({
5454

5555
const [splitDraftTransaction] = useOnyx(`${ONYXKEYS.COLLECTION.SPLIT_TRANSACTION_DRAFT}${transactionID}`);
5656

57-
// `getDescription` returns the raw `transaction.comment.comment`, which is stored as HTML for saved
58-
// transactions (e.g. viewing a completed split on `SplitBillDetailsPage`). Normalize to markdown so
59-
// both downstream consumers below — the `shouldParseTitle` `MenuItemWithTopDescription` (which runs
60-
// markdown→HTML on the value) and the editable `TextInput type="markdown"` — receive a consistent
61-
// markdown string regardless of whether the transaction is a draft (plain text) or a saved one (HTML).
57+
// `getDescription` returns raw `transaction.comment.comment`, which can be HTML for saved transactions.
58+
// We normalize to markdown so both the read-only and editable inputs receive a consistent format.
6259
const iouComment = Parser.htmlToMarkdown(getDescription(transaction));
6360

6461
const contextMenuStateValue = {

0 commit comments

Comments
 (0)