Skip to content
Snippets Groups Projects
Commit 916ee3e0 authored by syuilo's avatar syuilo
Browse files

Add link tests

parent 2863322d
No related branches found
No related tags found
No related merge requests found
......@@ -756,6 +756,28 @@ describe('FullParser', () => {
];
assert.deepStrictEqual(mfm.parse(input), output);
});
it('with brackets', () => {
const input = '[foo](https://example.com/foo(bar))';
const output = [
LINK(false, 'https://example.com/foo(bar)', [
TEXT('foo')
]),
];
assert.deepStrictEqual(mfm.parse(input), output);
});
it('with parent brackets', () => {
const input = '([foo](https://example.com/foo(bar)))';
const output = [
TEXT('('),
LINK(false, 'https://example.com/foo(bar)', [
TEXT('foo')
]),
TEXT(')'),
];
assert.deepStrictEqual(mfm.parse(input), output);
});
});
describe('fn v1', () => {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment