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

hiding comment author on mobile

This commit is contained in:
Fedor Katurov 2019-10-15 17:58:14 +07:00
parent fe90fc16ac
commit 6bb24fc869
2 changed files with 10 additions and 1 deletions

View file

@ -77,7 +77,9 @@ export const formatCommentText = (author, text: string) =>
.replace(/:\|--\|/gim, '://')
.split('\n')
.map((el, index) =>
index === 0 ? `${author ? `<p><b>${author}</b>: ` : ''}${el}</p>` : `<p>${el}</p>`
index === 0
? `${author ? `<p><b class="comment-author">${author}: </b>` : ''}${el}</p>`
: `<p>${el}</p>`
)
.join('');
// .replace(/\/\*(\*(?!\/)|[^*])*\*\//igm, '');