add space between paragraphs in comment snippet

This commit is contained in:
igoradamenko
2018-04-29 00:51:14 +03:00
parent 6829029227
commit 16696de99b
+1 -1
View File
@@ -333,7 +333,7 @@ export default class Comment extends Component {
function getTextSnippet(html) {
const LENGTH = 100;
const tmp = document.createElement('div');
tmp.innerHTML = html;
tmp.innerHTML = html.replace('</p><p>', ' ');
const result = tmp.innerText || '';
const snippet = result.substr(0, LENGTH);