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

Merge pull request #2510 from nagledb/nagledb-front-matter-title

Title will now be extracted from front matter if title: is present.
This commit is contained in:
Junyoung Choi (Sai)
2018-10-23 17:50:28 +09:00
committed by GitHub
6 changed files with 93 additions and 17 deletions

View File

@@ -91,7 +91,7 @@ class MarkdownNoteDetail extends React.Component {
handleUpdateContent () {
const { note } = this.state
note.content = this.refs.content.value
note.title = markdown.strip(striptags(findNoteTitle(note.content)))
note.title = markdown.strip(striptags(findNoteTitle(note.content, this.props.config.editor.enableFrontMatterTitle, this.props.config.editor.frontMatterTitleField)))
this.updateNote(note)
}