Fix MFM parsing: Ignore parent [] of URL
This commit is contained in:
parent
10677b57d4
commit
76693138d3
2 changed files with 11 additions and 2 deletions
|
@ -843,6 +843,15 @@ describe('MFM', () => {
|
|||
]);
|
||||
});
|
||||
|
||||
it('ignore parent []', () => {
|
||||
const tokens = parse('[https://example.com/foo]');
|
||||
assert.deepStrictEqual(tokens, [
|
||||
text('['),
|
||||
leaf('url', { url: 'https://example.com/foo' }),
|
||||
text(']')
|
||||
]);
|
||||
});
|
||||
|
||||
it('ignore parent brackets 2', () => {
|
||||
const tokens = parse('(foo https://example.com/foo)');
|
||||
assert.deepStrictEqual(tokens, [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue