mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 04:46:40 +07:00
fixed formatting empty text
This commit is contained in:
parent
09f5ab3c08
commit
c77e8e677a
2 changed files with 10 additions and 8 deletions
|
@ -100,10 +100,12 @@ export const formatText = (text: string): string =>
|
|||
.join('\n');
|
||||
|
||||
export const formatTextParagraphs = (text: string): string =>
|
||||
text
|
||||
.split('\n')
|
||||
.map(str => `<p>${str}</p>`)
|
||||
.join('\n');
|
||||
(text &&
|
||||
text
|
||||
.split('\n')
|
||||
.map(str => `<p>${str}</p>`)
|
||||
.join('\n')) ||
|
||||
null;
|
||||
|
||||
export const findBlockType = (line: string): ValueOf<typeof COMMENT_BLOCK_TYPES> => {
|
||||
const match = Object.values(COMMENT_BLOCK_DETECTORS).find(detector => line.match(detector.test));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue