* Update parser.ts * Update user.ts * Update search.ts * Update parser.ts * Update parser.ts * Update parser.ts * Update parser.ts * Update parser.ts * Update parser.ts * Update mfm.ts * Update parser.ts * Merge branch 'develop' into 3440-mk2 * Fix typo * Update parser.ts * Update mfm.ts * Update mfm.ts
This commit is contained in:
parent
82d721d60b
commit
3bcb344ecb
4 changed files with 19 additions and 3 deletions
16
test/mfm.ts
16
test/mfm.ts
|
@ -168,6 +168,22 @@ describe('Text', () => {
|
|||
]),
|
||||
node('mention', { acct: '@a', canonical: '@a', username: 'a', host: null })
|
||||
], tokens3);
|
||||
|
||||
const tokens4 = analyze('@\n@v\n@veryverylongusername' /* \n@toolongtobeasamention */ );
|
||||
assert.deepEqual([
|
||||
text('@\n'),
|
||||
node('mention', { acct: '@v', canonical: '@v', username: 'v', host: null }),
|
||||
text('\n'),
|
||||
node('mention', { acct: '@veryverylongusername', canonical: '@veryverylongusername', username: 'veryverylongusername', host: null }),
|
||||
// text('\n@toolongtobeasamention')
|
||||
], tokens4);
|
||||
/*
|
||||
const tokens5 = analyze('@domain_is@valid.example.com\n@domain_is@.invalid\n@domain_is@invali.d\n@domain_is@invali.d\n@domain_is@-invalid.com\n@domain_is@invalid-.com');
|
||||
assert.deepEqual([
|
||||
node('mention', { acct: '@domain_is@valid.example.com', canonical: '@domain_is@valid.example.com', username: 'domain_is', host: 'valid.example.com' }),
|
||||
text('\n@domain_is@.invalid\n@domain_is@invali.d\n@domain_is@invali.d\n@domain_is@-invalid.com\n@domain_is@invalid-.com')
|
||||
], tokens5);
|
||||
*/
|
||||
});
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue