1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-25 12:56:41 +07:00

better text formatting

This commit is contained in:
Fedor Katurov 2019-10-17 16:34:41 +07:00
parent de8e5b2d9e
commit 6d0a22707c
3 changed files with 19 additions and 13 deletions

View file

@ -1,7 +1,7 @@
import React, { FC } from 'react';
import { INode } from '~/redux/types';
import path from 'ramda/es/path';
import { formatCommentText } from '~/utils/dom';
import { formatText } from '~/utils/dom';
import * as styles from './styles.scss';
interface IProps {
@ -12,7 +12,7 @@ const NodeTextBlock: FC<IProps> = ({ node }) => (
<div
className={styles.text}
dangerouslySetInnerHTML={{
__html: formatCommentText(null, path(['blocks', 0, 'text'], node)),
__html: formatText(path(['blocks', 0, 'text'], node)),
}}
/>
);