mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-08-20 01:55:26 -05:00
Fix removeMarkdown stripping inline link text
This commit is contained in:
@@ -74,4 +74,10 @@ describe("removeMarkdown()", () => {
|
||||
test("Strips HTML tags and markdown emphasis", () => {
|
||||
expect(removeMarkdown("<p>Hello **world**!</p>")).toBe("Hello world!");
|
||||
});
|
||||
|
||||
test("Keeps the link text of inline links", () => {
|
||||
expect(
|
||||
removeMarkdown("Check out [the site](https://example.com) today"),
|
||||
).toBe("Check out the site today");
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user