From 48d0e2fa5f0c6ee4889037a113816893f25e550c Mon Sep 17 00:00:00 2001 From: syuilo Date: Thu, 29 Nov 2018 20:12:37 +0900 Subject: [MFM] Improve hashtag detection --- test/mfm.ts | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'test') diff --git a/test/mfm.ts b/test/mfm.ts index 4e29a69267..c89152f8a2 100644 --- a/test/mfm.ts +++ b/test/mfm.ts @@ -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([ -- cgit v1.2.3-freya