summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2018-11-29 20:12:37 +0900
committersyuilo <syuilotan@yahoo.co.jp>2018-11-29 20:12:37 +0900
commit48d0e2fa5f0c6ee4889037a113816893f25e550c (patch)
treeef93e892aed32c478334b7eec878746cf1239ac9 /test
parentRefactor (diff)
downloadsharkey-48d0e2fa5f0c6ee4889037a113816893f25e550c.tar.gz
sharkey-48d0e2fa5f0c6ee4889037a113816893f25e550c.tar.bz2
sharkey-48d0e2fa5f0c6ee4889037a113816893f25e550c.zip
[MFM] Improve hashtag detection
Diffstat (limited to 'test')
-rw-r--r--test/mfm.ts8
1 files changed, 8 insertions, 0 deletions
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([