-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Title will now be extracted from front matter if title: is present. #2510
Conversation
dc86600
to
7688631
Compare
I updated the PR: Added preferences to support toggling front matter title extraction on/off and to customize what field is used for the title. |
…n/off and to customize what field is used for the title.
7688631
to
3272033
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your contribution, please change your code a bit before we can merge it 🎉
enableTableEditor: this.refs.enableTableEditor.checked | ||
enableTableEditor: this.refs.enableTableEditor.checked, | ||
enableFrontMatterTitle: this.refs.enableFrontMatterTitle.checked, | ||
frontMatterTitleField: this.refs.frontMatterTitleField.value |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you should trim()
this string first. If I leave a leading blank space the title will be broken because <space>title
!= title
and you should add test for that too 😃
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, I think that change would definitely make sense but I'm not sure where to add it. It doesn't look like any of the other fields do any kind of validation/cleanup currently either. For example, I can change "Editor Font Size" to "12a" and I can change "LaTeX Inline Open Delimiter" to " $ " (two leading and two trailing spaces).
I also don't see that there's any existing test infrastructure for the UI tab or for the underlying ConfigManager.
Maybe that kind of stuff should all be done as a separate set of changes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm...I guess you're right. I approve your change and maybe open an issue for it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Builds on front matter changes introduced by #2347