[MFM] Better syntax parsing
Allow nesting by same tag
This commit is contained in:
15
test/mfm.ts
15
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', () => {
|
||||
|
Reference in New Issue
Block a user