From 345aab06d195035c48784b23c849825a61c5a79a Mon Sep 17 00:00:00 2001 From: HuyNguyen Date: Sun, 8 Dec 2024 23:19:14 +0700 Subject: [PATCH] TW-2145: Add ADR improve for `getEventContentFromMsgText` func --- ...ove-get-event-content-from-message-text.md | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 doc/adr/0003-improve-get-event-content-from-message-text.md diff --git a/doc/adr/0003-improve-get-event-content-from-message-text.md b/doc/adr/0003-improve-get-event-content-from-message-text.md new file mode 100644 index 000000000..9e355a861 --- /dev/null +++ b/doc/adr/0003-improve-get-event-content-from-message-text.md @@ -0,0 +1,24 @@ +# 3. 0003-improve-get-event-content-from-message-text.md + +Date: 2024-12-08 + +## Status + +Accepted + +## Context + +- The current implementation includes parsing the message for markdown, converting line breaks, and + formatting the message if necessary. + +## Decision + +- We will refactor the getEventContentFromMsgText function to improve its readability and structure. + The changes include: + 1. Extracting the markdown conversion logic into a separate function. + 2. Simplifying the line break conversion and formatting check. + +## Consequences + +- The function will be easier to read and maintain. +- The logic for markdown conversion and line break handling will be more modular and reusable \ No newline at end of file