summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2018-06-26 18:42:00 +0900
committersyuilo <syuilotan@yahoo.co.jp>2018-06-26 18:42:00 +0900
commit58064ec6338863106574260c0643df12be5ec029 (patch)
tree85c91d32e9a7f1731e8f531911994ba79420ea3b /test
parentFix #1781 (diff)
downloadmisskey-58064ec6338863106574260c0643df12be5ec029.tar.gz
misskey-58064ec6338863106574260c0643df12be5ec029.tar.bz2
misskey-58064ec6338863106574260c0643df12be5ec029.zip
MFM: Improve title syntax
Diffstat (limited to 'test')
-rw-r--r--test/mfm.ts12
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', () => {