mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 21:06:42 +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]
|
[stage 1]
|
||||||
- signup?
|
- signup?
|
||||||
- import videos
|
- import videos
|
||||||
- import graffiti
|
|
||||||
- text post can also has songs http://vault48.org/post5052
|
- text post can also has songs http://vault48.org/post5052
|
||||||
- fulltext search: https://github.com/typeorm/typeorm/issues/3191
|
- fulltext search: https://github.com/typeorm/typeorm/issues/3191
|
||||||
- zoom: https://manuelstofer.github.io/pinchzoom/
|
- zoom: https://manuelstofer.github.io/pinchzoom/
|
||||||
|
@ -47,6 +46,7 @@ render(
|
||||||
- comment editing
|
- comment editing
|
||||||
|
|
||||||
Done:
|
Done:
|
||||||
|
- import graffiti
|
||||||
- <...> format
|
- <...> format
|
||||||
- youtube embeds
|
- youtube embeds
|
||||||
- mobile header
|
- mobile header
|
||||||
|
|
|
@ -100,10 +100,12 @@ export const formatText = (text: string): string =>
|
||||||
.join('\n');
|
.join('\n');
|
||||||
|
|
||||||
export const formatTextParagraphs = (text: string): string =>
|
export const formatTextParagraphs = (text: string): string =>
|
||||||
|
(text &&
|
||||||
text
|
text
|
||||||
.split('\n')
|
.split('\n')
|
||||||
.map(str => `<p>${str}</p>`)
|
.map(str => `<p>${str}</p>`)
|
||||||
.join('\n');
|
.join('\n')) ||
|
||||||
|
null;
|
||||||
|
|
||||||
export const findBlockType = (line: string): ValueOf<typeof COMMENT_BLOCK_TYPES> => {
|
export const findBlockType = (line: string): ValueOf<typeof COMMENT_BLOCK_TYPES> => {
|
||||||
const match = Object.values(COMMENT_BLOCK_DETECTORS).find(detector => line.match(detector.test));
|
const match = Object.values(COMMENT_BLOCK_DETECTORS).find(detector => line.match(detector.test));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue