summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2019-01-17 09:33:08 +0900
committersyuilo <syuilotan@yahoo.co.jp>2019-01-17 09:33:08 +0900
commitcb6a4037f2f6c084ccccd2acb1826d2b2e7113b4 (patch)
treeba5dc3408bebd7a2dae2044681d5098fdaa1b8ea /test
parent[MFM] Better hashtag parsing: Ignore double quotation (diff)
downloadsharkey-cb6a4037f2f6c084ccccd2acb1826d2b2e7113b4.tar.gz
sharkey-cb6a4037f2f6c084ccccd2acb1826d2b2e7113b4.tar.bz2
sharkey-cb6a4037f2f6c084ccccd2acb1826d2b2e7113b4.zip
[MFM] Better hashtag parsing: Ignore single quotation
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 60fd4d62f8..4e922cab29 100644
--- a/test/mfm.ts
+++ b/test/mfm.ts
@@ -365,6 +365,14 @@ describe('MFM', () => {
]);
});
+ it('ignore single quote', () => {
+ const tokens = analyze('#foo\'');
+ assert.deepStrictEqual(tokens, [
+ leaf('hashtag', { hashtag: 'foo' }),
+ text('\''),
+ ]);
+ });
+
it('ignore double quote', () => {
const tokens = analyze('#foo"');
assert.deepStrictEqual(tokens, [