Skip to content
Snippets Groups Projects
Commit 0ecd1de5 authored by marihachi's avatar marihachi
Browse files

parses the link in the link node as text node.

parent 207134be
No related branches found
No related tags found
No related merge requests found
......@@ -343,6 +343,7 @@ link
linkLabelPart
= url { return text(); /* text node */ }
/ link { return text(); /* text node */ }
/ !"]" n:inline { return n; }
linkUrl
......
......@@ -457,6 +457,18 @@ describe('link', () => {
];
assert.deepStrictEqual(parse(input), output);
});
it('do not yield link node even if label is recognisable as a link', () => {
const input = 'official instance: [[https://misskey.io/@ai](https://misskey.io/@ai)](https://misskey.io/@ai).';
const output = [
TEXT('official instance: '),
LINK(false, 'https://misskey.io/@ai', [
TEXT('[https://misskey.io/@ai](https://misskey.io/@ai)')
]),
TEXT('.')
];
assert.deepStrictEqual(parse(input), output);
});
});
describe('fn', () => {
......
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