-
Notifications
You must be signed in to change notification settings - Fork 38
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
Fix intermediate state where newly gen frontmatter wasn't saved yet #558
Conversation
internal/document/frontmatter.go
Outdated
func (f *Frontmatter) Marshal(requireIdentity bool) ([]byte, error) { | ||
// Marshal returns a marshaled frontmatter including triple-dashed lines and a document ID. | ||
// If the identity is required, but Frontmatter is nil, a new one including ID is created. | ||
func (f *Frontmatter) Marshal(requireIdentity bool) ([]byte, string, error) { |
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.
Remark: In the ideal world we would strive for following signature: Marshal() ([]byte, error)
.
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 know, but it would require me to rethink/rewrite a large part of the prepopulating frontmatter scenario which makes other things super complicated.
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.
Still need to do more integration testing with the extension before committing to this change, fwiw.
Thanks for the review!
Quality Gate failedFailed conditions |
7deab68
to
5d6a408
Compare
Quality Gate passedIssues Measures |
Obsolete as of #677. |
Also simplifies logic when document-level lifecycle identity (i.e. doc ID) is turned off.