removed dependencies, html/preview

This commit is contained in:
Jori Lallo
2017-10-16 23:35:56 -07:00
parent 36d46533b6
commit 150771ee88
15 changed files with 46 additions and 419 deletions

View File

@@ -1,16 +0,0 @@
import truncate from 'truncate-html';
import { convertToMarkdown } from '../../frontend/utils/markdown';
truncate.defaultOptions = {
stripTags: false,
ellipsis: '...',
decodeEntities: false,
excludes: ['h1', 'pre'],
};
const truncateMarkdown = (text, length) => {
const html = convertToMarkdown(text);
return truncate(html, length);
};
export { truncateMarkdown };