mirror of
https://github.com/misskey-dev/misskey
synced 2024-11-28 14:58:36 +09:00
Fix MFM parsing
This commit is contained in:
parent
83d168ece3
commit
4b145da046
@ -17,7 +17,8 @@ export default function(text: string, index: number) {
|
||||
const quote = match[1]
|
||||
.split('\n')
|
||||
.map(line => line.replace(/^>+/g, '').trim())
|
||||
.join('\n');
|
||||
.join('\n')
|
||||
.trim();
|
||||
|
||||
return {
|
||||
type: 'quote',
|
||||
|
@ -152,6 +152,11 @@ describe('Text', () => {
|
||||
assert.deepEqual([
|
||||
{ type: 'quote', content: '> foo\n> bar\n> baz', quote: 'foo\nbar\nbaz' }
|
||||
], tokens4);
|
||||
|
||||
const tokens5 = analyze('"\nfoo\nbar\nbaz\n"');
|
||||
assert.deepEqual([
|
||||
{ type: 'quote', content: '"\nfoo\nbar\nbaz\n"', quote: 'foo\nbar\nbaz' }
|
||||
], tokens5);
|
||||
});
|
||||
|
||||
it('url', () => {
|
||||
|
Loading…
Reference in New Issue
Block a user