[MFM] Better hashtag parsing: Ignore trailing colon
This commit is contained in:
parent
3d62bd8007
commit
cd628eaf54
2 changed files with 9 additions and 1 deletions
|
@ -357,6 +357,14 @@ describe('MFM', () => {
|
|||
]);
|
||||
});
|
||||
|
||||
it('ignore colon', () => {
|
||||
const tokens = analyze('#Foo:');
|
||||
assert.deepStrictEqual(tokens, [
|
||||
leaf('hashtag', { hashtag: 'Foo' }),
|
||||
text(':'),
|
||||
]);
|
||||
});
|
||||
|
||||
it('allow including number', () => {
|
||||
const tokens = analyze('#foo123');
|
||||
assert.deepStrictEqual(tokens, [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue