summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2019-01-31 12:23:45 +0900
committersyuilo <syuilotan@yahoo.co.jp>2019-01-31 12:23:45 +0900
commitb515cc90e9070465d9ba1f2e40d7af184fff5491 (patch)
tree62fe52284a87479560c97f0b242d89bf91f74236 /test
parent[MFM] Make some syntax block (diff)
downloadmisskey-b515cc90e9070465d9ba1f2e40d7af184fff5491.tar.gz
misskey-b515cc90e9070465d9ba1f2e40d7af184fff5491.tar.bz2
misskey-b515cc90e9070465d9ba1f2e40d7af184fff5491.zip
[MFM] Better syntax parsing
Allow nesting by same tag
Diffstat (limited to 'test')
-rw-r--r--test/mfm.ts15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/mfm.ts b/test/mfm.ts
index 7e7d2bf56d..0de2e6b2c1 100644
--- a/test/mfm.ts
+++ b/test/mfm.ts
@@ -276,6 +276,21 @@ describe('MFM', () => {
}),
]);
});
+
+ it('nested', () => {
+ const tokens = parse('<spin><spin>:foo:</spin></spin>');
+ assert.deepStrictEqual(tokens, [
+ tree('spin', [
+ tree('spin', [
+ leaf('emoji', { name: 'foo' })
+ ], {
+ attr: null
+ }),
+ ], {
+ attr: null
+ }),
+ ]);
+ });
});
it('jump', () => {