mirror of https://github.com/msgbyte/tailchat
fix: 修复带空格的bbcode 内容显示会出现问题的bug
parent
7a457209b3
commit
07213b998f
@ -0,0 +1,18 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`render <BBCode /> mention with space name 1`] = `
|
||||
<div>
|
||||
<span
|
||||
class="plugin-bbcode-mention-tag"
|
||||
data-userid="6251986eab331ca2efbba9c6"
|
||||
>
|
||||
@
|
||||
Notify Bot
|
||||
</span>
|
||||
<pre
|
||||
style="display: inline; white-space: break-spaces;"
|
||||
>
|
||||
123123
|
||||
</pre>
|
||||
</div>
|
||||
`;
|
@ -0,0 +1,11 @@
|
||||
import { render } from '@testing-library/react';
|
||||
import React from 'react';
|
||||
import BBCode from '../render';
|
||||
|
||||
describe('render <BBCode />', () => {
|
||||
test('mention with space name', () => {
|
||||
const raw = '[at=6251986eab331ca2efbba9c6]Notify Bot[/at] 123123';
|
||||
const wrapper = render(<BBCode plainText={raw} />);
|
||||
expect(wrapper.container).toMatchSnapshot();
|
||||
});
|
||||
});
|
Loading…
Reference in New Issue