mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-22 01:47:39 -07:00
Add some MFM tests
This commit is contained in:
parent
0e362b3cef
commit
0e7c5d147e
1 changed files with 18 additions and 0 deletions
18
test/mfm.ts
18
test/mfm.ts
|
@ -1173,6 +1173,24 @@ describe('MFM', () => {
|
|||
text('foo_bar_baz'),
|
||||
]);
|
||||
});
|
||||
|
||||
it('require spaces', () => {
|
||||
const tokens = parse('湊おじたん@4日目_L38b #pixiv https://www.pixiv.net/member_illust.php');
|
||||
assert.deepStrictEqual(tokens, [
|
||||
text('湊おじたん@4日目_L38b #pixiv https://www.pixiv.net/member_illust.php'),
|
||||
]);
|
||||
});
|
||||
|
||||
it('newline sandwich', () => {
|
||||
const tokens = parse('foo\n_bar_\nbaz');
|
||||
assert.deepStrictEqual(tokens, [
|
||||
text('foo\n'),
|
||||
tree('italic', [
|
||||
text('bar')
|
||||
], {}),
|
||||
text('baz'),
|
||||
]);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue