mirror of
https://github.com/wassname/talk.git
synced 2026-08-07 11:29:44 +08:00
replaced eslint:recommended with prettier
This commit is contained in:
@@ -3,22 +3,22 @@ import Linkify from 'react-linkify';
|
||||
|
||||
const name = 'talk-plugin-comment-content';
|
||||
|
||||
const CommentContent = ({comment}) => {
|
||||
const CommentContent = ({ comment }) => {
|
||||
const textbreaks = comment.body.split('\n');
|
||||
return <span className={`${name}-text`}>
|
||||
{
|
||||
textbreaks.map((line, i) => {
|
||||
return (
|
||||
<span className={`${name}-text`}>
|
||||
{textbreaks.map((line, i) => {
|
||||
return (
|
||||
<span key={i} className={`${name}-line`}>
|
||||
<Linkify properties={{target: '_blank'}}>
|
||||
{line.trim()}
|
||||
</Linkify>
|
||||
{i !== textbreaks.length - 1 && <br className={`${name}-linebreak`}/>}
|
||||
<Linkify properties={{ target: '_blank' }}>{line.trim()}</Linkify>
|
||||
{i !== textbreaks.length - 1 && (
|
||||
<br className={`${name}-linebreak`} />
|
||||
)}
|
||||
</span>
|
||||
);
|
||||
})
|
||||
}
|
||||
</span>;
|
||||
})}
|
||||
</span>
|
||||
);
|
||||
};
|
||||
|
||||
export default CommentContent;
|
||||
|
||||
Reference in New Issue
Block a user