mirror of
https://activitypub.software/TransFem-org/sfm-js
synced 2024-11-29 01:13:02 +00:00
Add link test
This commit is contained in:
parent
2eed3ecae5
commit
faacf34ba0
1 changed files with 10 additions and 0 deletions
|
@ -931,6 +931,16 @@ hoge`;
|
||||||
assert.deepStrictEqual(mfm.parse(input), output);
|
assert.deepStrictEqual(mfm.parse(input), output);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('do not yield mention', () => {
|
||||||
|
const input = '[@example](https://example.com)';
|
||||||
|
const output = [
|
||||||
|
LINK(false, 'https://example.com', [
|
||||||
|
TEXT('@example')
|
||||||
|
]),
|
||||||
|
];
|
||||||
|
assert.deepStrictEqual(mfm.parse(input), output);
|
||||||
|
});
|
||||||
|
|
||||||
it('with brackets', () => {
|
it('with brackets', () => {
|
||||||
const input = '[foo](https://example.com/foo(bar))';
|
const input = '[foo](https://example.com/foo(bar))';
|
||||||
const output = [
|
const output = [
|
||||||
|
|
Loading…
Reference in a new issue