mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-03 13:22:14 +00:00
fix: correct telegram html nesting (#4578) (thanks @ThanhNguyxn)
This commit is contained in:
@@ -59,4 +59,14 @@ describe("markdownToTelegramHtml", () => {
|
||||
const res = markdownToTelegramHtml("**bold [link](https://example.com) text**");
|
||||
expect(res).toBe('<b>bold <a href="https://example.com">link</a> text</b>');
|
||||
});
|
||||
|
||||
it("properly nests bold wrapping a link with trailing text", () => {
|
||||
const res = markdownToTelegramHtml("**[link](https://example.com) rest**");
|
||||
expect(res).toBe('<b><a href="https://example.com">link</a> rest</b>');
|
||||
});
|
||||
|
||||
it("properly nests bold inside a link", () => {
|
||||
const res = markdownToTelegramHtml("[**bold**](https://example.com)");
|
||||
expect(res).toBe('<a href="https://example.com"><b>bold</b></a>');
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user