Skip to content

Commit e0c547d

Browse files
committed
Refine link handling in escapeMarkdownV2 function to support [[text]](url) format using regex.
1 parent 0395282 commit e0c547d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

apps/bot/src/bot.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ function escapeMarkdownV2(text: string): string {
1313
const links: string[] = [];
1414
let linkIndex = 0;
1515

16-
// Replace links with placeholders
16+
// Handle links with proper regex for [[text]](url) format
1717
const withPlaceholders = text.replace(
1818
/\[([^\]]*)\]\(([^)]*)\)/g,
1919
(match, linkText, url) => {

0 commit comments

Comments
 (0)