Skip to content

Fix a bug with handling of @link tags for API Extractor - #240

Merged
Pete Gonzalez (octogonz) merged 6 commits into
masterfrom
pgonzal/ae-pipe-bug
Jun 19, 2017
Merged

Pete Gonzalez (octogonz) merged 6 commits into
masterfrom
pgonzal/ae-pipe-bug

Conversation

@octogonz

Copy link
Copy Markdown
Collaborator

API Extractor @link tags can include optional display text. For example, "widgets" and "draw() function" in this sample code:

/**
 * The base class for all {@link https://en.wikipedia.org/wiki/Widget | widgets}.
 * @remarks
 * Implements the {@link @microsoft/widget-lib:IWidget} interface.  To draw the widget,
 * call the {@link BaseWidget.draw | draw() function}.
 * @public
 */

This PR fixes a bug where certain characters (e.g. an apostrophe) were not allowed in the display text.

It also changes the API JSON semantics slightly: Before, if display text was omitted, the value field would be an empty string, leaving the documentation generator to determine the display text based on the address. After this PR, API Extractor always provides the display text.

@chackman Chris Hackmann (chackman) Jun 19, 2017 •

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.

isplay text [](start = 38, length = 12)

I couldn't find a test with an empty reference. Do you have one? #Resolved

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I forgot to push it. See below


In reply to: 122821868 [](ancestors = 122821868)

@chackman Chris Hackmann (chackman) Jun 19, 2017 •

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.

pipeSplitContent.length > 0 [](start = 32, length = 27)

Realistically can pipeSplitContent.length ever be <= 0? (If so, shouldn't that be an error?) #Resolved

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

According to the docs, this can only happen if the split() delimiter itself is an empty string.

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/split


In reply to: 122822139 [](ancestors = 122822139)

@chackman Chris Hackmann (chackman) Jun 19, 2017 •

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.

Nitpicky, but standardize on either "reserved" (used here) or "unsupported" (used in the error message). #Resolved

@chackman

Copy link
Copy Markdown
Member

:shipit:

@octogonz

Pete Gonzalez (octogonz) commented Jun 19, 2017 •

Copy link
Copy Markdown
Collaborator Author

:shipit:

Approved with PullApprove Approved with PullApprove

…pipe-bug

# Conflicts:
#	libraries/api-extractor/testInputs/example3/example3-output.json
@octogonz
Pete Gonzalez (octogonz) merged commit 7ea76b2 into master Jun 19, 2017
@octogonz
Pete Gonzalez (octogonz) deleted the pgonzal/ae-pipe-bug branch July 3, 2017 04:49
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.

4 participants