diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2018-06-26 18:42:00 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2018-06-26 18:42:00 +0900 |
| commit | 58064ec6338863106574260c0643df12be5ec029 (patch) | |
| tree | 85c91d32e9a7f1731e8f531911994ba79420ea3b /test | |
| parent | Fix #1781 (diff) | |
| download | misskey-58064ec6338863106574260c0643df12be5ec029.tar.gz misskey-58064ec6338863106574260c0643df12be5ec029.tar.bz2 misskey-58064ec6338863106574260c0643df12be5ec029.zip | |
MFM: Improve title syntax
Diffstat (limited to 'test')
| -rw-r--r-- | test/mfm.ts | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/mfm.ts b/test/mfm.ts index f7fa1c0f5d..df0f0be045 100644 --- a/test/mfm.ts +++ b/test/mfm.ts @@ -115,6 +115,18 @@ describe('Text', () => { { type: 'search', content: 'a b c SEARCH', query: 'a b c'} ], tokens4); }); + + it('title', () => { + const tokens1 = analyze('【yee】\nhaw'); + assert.deepEqual( + { type: 'title', content: '【yee】\n', title: 'yee'} + , tokens1[0]); + + const tokens2 = analyze('[yee]\nhaw'); + assert.deepEqual( + { type: 'title', content: '[yee]\n', title: 'yee'} + , tokens2[0]); + }); }); describe('syntax highlighting', () => { |