-
Notifications
You must be signed in to change notification settings - Fork 500
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
Add option to control generation of timestamps. #338
Conversation
@@ -296,7 +296,7 @@ def build_pdf_info doc | |||
info[:Creator] = str2pdfval %(Asciidoctor PDF #{::Asciidoctor::Pdf::VERSION}, based on Prawn #{::Prawn::VERSION}) | |||
info[:Producer] ||= (info[:Author] || info[:Creator]) | |||
# FIXME use docdate attribute | |||
info[:ModDate] = info[:CreationDate] = ::Time.now | |||
info[:ModDate] = info[:CreationDate] = ::Time.now if doc.attr 'timestamps' |
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.
Could you write this as:
if doc.attr? 'timestamps'
Notice the question mark.
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 wasn't clear if doing "timestamps!" would result in the value being absent altogether. If so, that's a fine solution and I'm happy to make the change. Otherwise, if it's still present but false, I think that will break functionality.
We'll wait on the merge in core before merging this one. |
Now that the corresponding issue is merged in core, can you update this PR to align with the approach we took there (i.e., |
Sure. I'll pick that up tomorrow, now that I'm back in Houston. |
👍 Thanks! |
Updated. |
Thanks! |
Add option to control generation of timestamps
This is the corresponding change related to asciidoctor/asciidoctor#1453.