-
Notifications
You must be signed in to change notification settings - Fork 131
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests for htmltomarkdown for usermentions
- Loading branch information
1 parent
bd030be
commit 499d869
Showing
1 changed file
with
14 additions
and
0 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -690,3 +690,17 @@ test('Test codeFence copy from selection does not add extra new line', () => { | |
testString = '<h3>test heading</h3><div><pre class=\"notranslate\"><code class=\"notranslate\">Code snippet\n</code></pre></div><blockquote><p><a href=\"https://www.example.com\">link</a></p></blockquote>'; | ||
expect(parser.htmlToMarkdown(testString)).toBe('test heading\n```\nCode snippet\n```\n> [link](https://www.example.com)') | ||
}); | ||
|
||
test('Mention html to markdown', () => { | ||
let testString = '<mention-user>@[email protected]</mention-user>'; | ||
expect(parser.htmlToMarkdown(testString)).toBe('@[email protected]'); | ||
|
||
testString = '<mention-user>@[email protected]</mention-user>'; | ||
expect(parser.htmlToMarkdown(testString)).toBe('@[email protected]'); | ||
|
||
testString = '<mention-user>@[email protected]</mention-user>'; | ||
expect(parser.htmlToMarkdown(testString)).toBe('@[email protected]'); | ||
|
||
testString = '<mention-user>@[email protected]</mention-user>'; | ||
expect(parser.htmlToMarkdown(testString)).toBe('@[email protected]'); | ||
}); |