From b515cc90e9070465d9ba1f2e40d7af184fff5491 Mon Sep 17 00:00:00 2001 From: syuilo Date: Thu, 31 Jan 2019 12:23:45 +0900 Subject: [MFM] Better syntax parsing Allow nesting by same tag --- test/mfm.ts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'test') 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(':foo:'); + assert.deepStrictEqual(tokens, [ + tree('spin', [ + tree('spin', [ + leaf('emoji', { name: 'foo' }) + ], { + attr: null + }), + ], { + attr: null + }), + ]); + }); }); it('jump', () => { -- cgit v1.2.3-freya