summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2019-03-05 22:18:29 +0900
committersyuilo <syuilotan@yahoo.co.jp>2019-03-05 22:18:29 +0900
commit2782e7d26f892eabfdc91d3ebf995d12e75e16cf (patch)
treecec279b75d0d8007e947b3da42a009d8ae8e2530 /test
parent[Client] Better transition (diff)
downloadsharkey-2782e7d26f892eabfdc91d3ebf995d12e75e16cf.tar.gz
sharkey-2782e7d26f892eabfdc91d3ebf995d12e75e16cf.tar.bz2
sharkey-2782e7d26f892eabfdc91d3ebf995d12e75e16cf.zip
[MFM] Improve hashtag parsing
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 7db94b45e1..fa46c3ff0e 100644
--- a/test/mfm.ts
+++ b/test/mfm.ts
@@ -550,6 +550,14 @@ describe('MFM', () => {
]);
});
+ it('ignore square brackets', () => {
+ const tokens = parse('#foo]');
+ assert.deepStrictEqual(tokens, [
+ leaf('hashtag', { hashtag: 'foo' }),
+ text(']'),
+ ]);
+ });
+
it('allow including number', () => {
const tokens = parse('#foo123');
assert.deepStrictEqual(tokens, [