Use mfm-js for MFM parsing (#7415)
* wip * Update mfm.ts * wip * update mfmjs * refactor * nanka * Update mfm.ts * Update to-html.ts * Update to-html.ts * wip * fix test * fix test
This commit is contained in:
parent
b378066ebf
commit
1f4ae2f63a
31 changed files with 262 additions and 1771 deletions
|
@ -1,7 +1,7 @@
|
|||
import * as assert from 'assert';
|
||||
|
||||
import extractMentions from '../src/misc/extract-mentions';
|
||||
import { parse } from '../src/mfm/parse';
|
||||
import { parse } from 'mfm-js';
|
||||
|
||||
describe('Extract mentions', () => {
|
||||
it('simple', () => {
|
||||
|
@ -10,17 +10,14 @@ describe('Extract mentions', () => {
|
|||
assert.deepStrictEqual(mentions, [{
|
||||
username: 'foo',
|
||||
acct: '@foo',
|
||||
canonical: '@foo',
|
||||
host: null
|
||||
}, {
|
||||
username: 'bar',
|
||||
acct: '@bar',
|
||||
canonical: '@bar',
|
||||
host: null
|
||||
}, {
|
||||
username: 'baz',
|
||||
acct: '@baz',
|
||||
canonical: '@baz',
|
||||
host: null
|
||||
}]);
|
||||
});
|
||||
|
@ -31,17 +28,14 @@ describe('Extract mentions', () => {
|
|||
assert.deepStrictEqual(mentions, [{
|
||||
username: 'foo',
|
||||
acct: '@foo',
|
||||
canonical: '@foo',
|
||||
host: null
|
||||
}, {
|
||||
username: 'bar',
|
||||
acct: '@bar',
|
||||
canonical: '@bar',
|
||||
host: null
|
||||
}, {
|
||||
username: 'baz',
|
||||
acct: '@baz',
|
||||
canonical: '@baz',
|
||||
host: null
|
||||
}]);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue