Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

docs($resource): JSDoc Parsing of ) in Link #15825

Closed
wants to merge 1 commit into from

Conversation

BobChao87
Copy link
Contributor

JSDoc to HTML converter was catching the close parenthesis in [MDN](...#toJson()_behavior) from the toJson() and treating it as the final close parenthesis.
End result was a link to MDN that didn't link to the correct section, but did resolve. It was followed by a non-link "_behavior)".
Updated version with percent encoding correct resolves to desired section and gets parsed to the correct link in JSDoc to HTML.

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)

Docs update. Also sorta a bug.

What is the current behavior? (You can also link to an open issue here)

Link works, but doesn't point to desired section. Side-effect of leaving a literal "_behavior)" artifact in the docs.

What is the new behavior (if this is a feature change)?

Link work, and now points to correct section through the magic of percent encoding. Also removes artifact as expected.

Does this PR introduce a breaking change?

No.

Please check if the PR fulfills these requirements

Other information:

JSDoc to HTML converter was catching the close parenthesis in `[MDN](...#toJson()_behavior)` from the `toJson()` and treating it as the final close parenthesis.
End result was a link to MDN that didn't link to the correct section, but did resolve. It was followed by a non-link "_behavior)".
Updated version with percent encoding correct resolves to desired section and gets parsed to the correct link in JSDoc to HTML.
@BobChao87
Copy link
Contributor Author

Travis CI error seems unrelated to PR as this change seems unlikely to have caused a

Failed: waitForAngular() should have timed out, but didn't

at angular.js/test/e2e/tests/ng-route-promise.spec.js:16:7 given that this is a documentation change in an unrelated file.

I feel like (unrelated) CI failures happen almost every time I contribute though... It's weird.

@gkalpak gkalpak closed this in d941539 Mar 20, 2017
gkalpak pushed a commit that referenced this pull request Mar 20, 2017
JSDoc to HTML converter was treating the close parenthesis in
`[MDN](...#toJson()_behavior)` as the final close parenthesis, thus resulting in
a broken link.
This commit fixes it by percent-encoding the parentesis in the link address.

Closes #15825
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants