mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 12:56:41 +07:00
fixed formatting empty text
This commit is contained in:
parent
09f5ab3c08
commit
c77e8e677a
2 changed files with 10 additions and 8 deletions
|
@ -36,7 +36,6 @@ render(
|
|||
[stage 1]
|
||||
- signup?
|
||||
- import videos
|
||||
- import graffiti
|
||||
- text post can also has songs http://vault48.org/post5052
|
||||
- fulltext search: https://github.com/typeorm/typeorm/issues/3191
|
||||
- zoom: https://manuelstofer.github.io/pinchzoom/
|
||||
|
@ -47,6 +46,7 @@ render(
|
|||
- comment editing
|
||||
|
||||
Done:
|
||||
- import graffiti
|
||||
- <...> format
|
||||
- youtube embeds
|
||||
- mobile header
|
||||
|
|
|
@ -100,10 +100,12 @@ export const formatText = (text: string): string =>
|
|||
.join('\n');
|
||||
|
||||
export const formatTextParagraphs = (text: string): string =>
|
||||
(text &&
|
||||
text
|
||||
.split('\n')
|
||||
.map(str => `<p>${str}</p>`)
|
||||
.join('\n');
|
||||
.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