complete setting and editing description

This commit is contained in:
muerwre 2019-03-29 11:31:04 +07:00
parent c040e33a8a
commit 8f60a5efd6
10 changed files with 118 additions and 91 deletions

View file

@ -13,3 +13,5 @@ export const toHours = (info: number): string => {
export const toTranslit = (string: string): string => (
removeGarbage(ru.reduce((text, el, i) => (text.replace(new RegExp(ru[i], 'g'), en[i])), (String(string) || '')))
);
export const parseDesc = (text: string): string => text.replace(/(\n{2,})/ig, "\n\n");