feat: wrap generated body from link in markdown quite, close #278
This commit is contained in:
1 parent
df0cfbd932
commit
28dbb51bd4
1 file changed
+6
-2
@@ -74,7 +74,7 @@
|
|||||||
})
|
})
|
||||||
|
|
||||||
async function submit() {
|
async function submit() {
|
||||||
if ((!data.community) && !edit) {
|
if (!data.community && !edit) {
|
||||||
toast({
|
toast({
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
content: 'You need to set a community.',
|
content: 'You need to set a community.',
|
||||||
@@ -155,7 +155,11 @@
|
|||||||
const oldData = { ...data }
|
const oldData = { ...data }
|
||||||
|
|
||||||
if (res.metadata.title) data.title = res.metadata.title
|
if (res.metadata.title) data.title = res.metadata.title
|
||||||
if (res.metadata.description) data.body = res.metadata.description
|
if (res.metadata.description)
|
||||||
|
data.body = res.metadata.description
|
||||||
|
.split('\n')
|
||||||
|
.map((l) => `> ${l}`)
|
||||||
|
.join('\n')
|
||||||
|
|
||||||
toast({
|
toast({
|
||||||
content: `Generated title and body from that website. Would you like to undo this action?`,
|
content: `Generated title and body from that website. Would you like to undo this action?`,
|
||||||
|
|||||||
Reference in new issue
Block a user