[MFM] Better syntax parsing

Allow nesting by same tag
This commit is contained in:
syuilo
2019-01-31 12:23:45 +09:00
parent bb92158dff
commit b515cc90e9
2 changed files with 18 additions and 3 deletions

View File

@ -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', () => {