Skip to content

Conversation

@helixquar
Copy link

@helixquar helixquar commented Dec 22, 2022

Feature

  • Description of what's added

In addition to {author} and {email}, this PR adds {date} to the @author tag.

  • Added gif to README

  • Added unit test

@helixquar
Copy link
Author

helixquar commented Dec 22, 2022

@cschlosser, would you welcome PRs for very specific use cases like this?

I needed something like:

@author NAME 2022/12/22 Description

But I don't think there's a lot of people who will be using it this way.

Do you think it would be better if I generalize this change to making all substitutions work for all tags?

@cschlosser
Copy link
Owner

Hi @helixquar ,

It's fine as is. Please just also address the other two checkboxes and then I will merge it.

protected generateAuthorTag(lines: string[]) {
let dateFormat: string = "YYYY-MM-DD"; // Default to ISO standard if not defined
if ( this.cfg.Generic.dateFormat.trim().length !== 0) {
dateFormat = this.cfg.Generic.dateFormat; // Overwrite with user format
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
dateFormat = this.cfg.Generic.dateFormat; // Overwrite with user format
dateFormat = this.cfg.Generic.dateFormat.trim(); // Overwrite with user format

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants