This commit is contained in:
parent
5ad77e8a3a
commit
bc3006f3c4
9 changed files with 92 additions and 17 deletions
20
test/text.js
20
test/text.js
|
@ -49,11 +49,23 @@ describe('Text', () => {
|
|||
], tokens);
|
||||
});
|
||||
|
||||
it('link', () => {
|
||||
it('url', () => {
|
||||
const tokens = analyze('https://himasaku.net');
|
||||
assert.deepEqual([
|
||||
{ type: 'link', content: 'https://himasaku.net' }
|
||||
], tokens);
|
||||
assert.deepEqual([{
|
||||
type: 'url',
|
||||
content: 'https://himasaku.net',
|
||||
url: 'https://himasaku.net'
|
||||
}], tokens);
|
||||
});
|
||||
|
||||
it('link', () => {
|
||||
const tokens = analyze('[ひまさく](https://himasaku.net)');
|
||||
assert.deepEqual([{
|
||||
type: 'link',
|
||||
content: '[ひまさく](https://himasaku.net)',
|
||||
title: 'ひまさく',
|
||||
url: 'https://himasaku.net'
|
||||
}], tokens);
|
||||
});
|
||||
|
||||
it('emoji', () => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue