forked from famedly/matrix-dart-sdk
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TW-2145: Add ADR improve for
getEventContentFromMsgText
func
- Loading branch information
Showing
1 changed file
with
24 additions
and
0 deletions.
There are no files selected for viewing
24 changes: 24 additions & 0 deletions
24
doc/adr/0003-improve-get-event-content-from-message-text.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |