Skip to content

Support email in author JSDoc tag#29717

Merged
sandersn merged 3 commits into
microsoft:masterfrom
petersandor:jsdoc-tag-author-email-support
Jul 3, 2019
Merged

Support email in author JSDoc tag#29717
sandersn merged 3 commits into
microsoft:masterfrom
petersandor:jsdoc-tag-author-email-support

Conversation

@petersandor
Copy link
Copy Markdown
Contributor

Fixes #17244

@msftclas
Copy link
Copy Markdown

msftclas commented Feb 4, 2019

CLA assistant check
All CLA requirements met.

Copy link
Copy Markdown
Member

@sandersn sandersn left a comment

Choose a reason for hiding this comment

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

Some ideas for simplifying the code.

Comment thread src/compiler/parser.ts Outdated
Comment thread src/compiler/parser.ts Outdated
Comment thread src/compiler/types.ts
Comment thread src/compiler/parser.ts Outdated
const result = <JSDocAuthorTag>createNode(SyntaxKind.JSDocAuthorTag, start);
result.tagName = tagName;

const comment = tryParse(() => tryParseAuthorNameAndEmail());
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Since you aren't putting the author address into a separate field, I think would be pretty simple to make this work without backtracking.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I'm not sure about the best way to achieve that. I return the parsing back to parseTag in case there is no email address provided instead of taking over parsing for the tag in all cases.

Comment thread src/compiler/parser.ts Outdated
Comment thread src/compiler/parser.ts
@petersandor petersandor force-pushed the jsdoc-tag-author-email-support branch from 7deee5d to 6e4f581 Compare February 9, 2019 17:18
@petersandor petersandor force-pushed the jsdoc-tag-author-email-support branch 2 times, most recently from 26dd3fa to 93bb0be Compare March 10, 2019 09:37
@petersandor petersandor force-pushed the jsdoc-tag-author-email-support branch from 93bb0be to 08bd017 Compare April 19, 2019 10:03
@sandersn sandersn merged commit 6f0baa3 into microsoft:master Jul 3, 2019
@petersandor petersandor deleted the jsdoc-tag-author-email-support branch July 12, 2019 09:22
@nelson6e65
Copy link
Copy Markdown

Sad this is not in 3.5. 😢

@microsoft microsoft locked as resolved and limited conversation to collaborators Oct 21, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

JSDoc returns @author email address as own tag

4 participants