[MFM] Improve hashtag detection
This commit is contained in:
parent
0489291815
commit
48d0e2fa5f
2 changed files with 9 additions and 1 deletions
|
@ -186,6 +186,14 @@ describe('Text', () => {
|
|||
], tokens);
|
||||
});
|
||||
|
||||
it('with text (zenkaku)', () => {
|
||||
const tokens = analyze('こんにちは #世界');
|
||||
assert.deepEqual([
|
||||
text('こんにちは '),
|
||||
node('hashtag', { hashtag: '世界' })
|
||||
], tokens);
|
||||
});
|
||||
|
||||
it('ignore comma and period', () => {
|
||||
const tokens = analyze('Foo #bar, baz #piyo.');
|
||||
assert.deepEqual([
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue