1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-13 09:46:22 +00:00

remove the first occurrence of title in content when publishing to WP

This commit is contained in:
lurong
2018-02-24 02:51:01 +08:00
parent f3f6095d81
commit 97600e526b

View File

@@ -687,9 +687,10 @@ class NoteList extends React.Component {
} else {
token = `Bearer ${token}`
}
let contentToRender = firstNote.content.replace(`# ${firstNote.title}`, '')
var data = {
title: firstNote.title,
content: markdown.render(firstNote.content),
content: markdown.render(contentToRender),
status: 'publish'
}