mirror of
https://activitypub.software/TransFem-org/sfm-js
synced 2024-11-21 21:55:09 +00:00
test that I've not broken whitespace handling
This commit is contained in:
parent
4ff4ee6fd2
commit
8818a2df9a
1 changed files with 11 additions and 0 deletions
|
@ -815,6 +815,17 @@ hoge`;
|
|||
assert.deepStrictEqual(mfm.parse(input), output);
|
||||
});
|
||||
|
||||
test('newlines and whitespace', () => {
|
||||
const input = 'before #abc\nafter #def\u3000foo #ghi\tbar #jkl';
|
||||
const output = [
|
||||
TEXT('before '), HASHTAG('abc'),
|
||||
TEXT('\nafter '), HASHTAG('def'),
|
||||
TEXT('\u3000foo '), HASHTAG('ghi'),
|
||||
TEXT('\tbar '), HASHTAG('jkl'),
|
||||
];
|
||||
assert.deepStrictEqual(mfm.parse(input), output);
|
||||
});
|
||||
|
||||
test('with keycap number sign', () => {
|
||||
const input = '#️⃣abc123 #abc';
|
||||
const output = [UNI_EMOJI('#️⃣'), TEXT('abc123 '), HASHTAG('abc')];
|
||||
|
|
Loading…
Reference in a new issue