mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 17:56:25 +00:00
remove the first occurrence of title in content when publishing to WP
This commit is contained in:
@@ -687,9 +687,10 @@ class NoteList extends React.Component {
|
|||||||
} else {
|
} else {
|
||||||
token = `Bearer ${token}`
|
token = `Bearer ${token}`
|
||||||
}
|
}
|
||||||
|
let contentToRender = firstNote.content.replace(`# ${firstNote.title}`, '')
|
||||||
var data = {
|
var data = {
|
||||||
title: firstNote.title,
|
title: firstNote.title,
|
||||||
content: markdown.render(firstNote.content),
|
content: markdown.render(contentToRender),
|
||||||
status: 'publish'
|
status: 'publish'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user