Skip to content

Commit fbe6cb3

Browse files
rezk2llLabels Bot
authored andcommitted
🛠 Fixed code, quote, ordered list blocks not showing up (#2448)
1 parent 9f02b93 commit fbe6cb3

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

twake/frontend/src/app/views/applications/messages/message/parts/Blocks.utils.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,13 @@ export const preparse = (str: string) => {
66
//Prevent html security issues
77
.replace(/&/g, '&')
88
.replace(/</g, '&lt;')
9-
.replace(/>/g, '&gt;')
109
//Prepare mentions
1110
.replace(/([ \t]|^)@([\w]+)/g, '$1<user id="$2"/>')
1211
.replace(/([ \t]|^)#([\w]+)/g, '$1<channel id="$2"/>')
12+
//Prepare code
13+
.replace(/[^\n]\r?\n{1}`{3}/, '\n\n```')
14+
// prepare quote
15+
.replace(/^(>{1})([^>]*)\n(.*)/gm, '> $2\n\n$3')
1316
);
1417
};
1518

twake/frontend/src/tailwind.css

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,10 @@ input.ant-input {
2222
a {
2323
color: var(--primary) !important;
2424
}
25+
26+
@layer base {
27+
ul,ol {
28+
list-style: revert;
29+
padding: revert;
30+
}
31+
}

0 commit comments

Comments
 (0)