Skip to content
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

docs(datatype): allow markdown in @see links #1667

Merged
merged 15 commits into from
Dec 26, 2022

Conversation

matthewmayer
Copy link
Contributor

@matthewmayer matthewmayer commented Dec 16, 2022

The backtick in the @see causes the link to get broken and the second see also not to appear:

On https://next.fakerjs.dev/api/datatype.html#number

Screenshot 2022-12-16 at 14 15 45

after fix:

Screenshot 2022-12-16 at 14 22 50

@matthewmayer matthewmayer marked this pull request as ready for review December 16, 2022 07:26
@matthewmayer matthewmayer requested a review from a team as a code owner December 16, 2022 07:26
@codecov
Copy link

codecov bot commented Dec 16, 2022

Codecov Report

Merging #1667 (d969a88) into next (ec53c45) will not change coverage.
The diff coverage is n/a.

Additional details and impacted files
@@           Coverage Diff           @@
##             next    #1667   +/-   ##
=======================================
  Coverage   99.64%   99.64%           
=======================================
  Files        2240     2240           
  Lines      240098   240098           
  Branches     1068     1068           
=======================================
  Hits       239239   239239           
  Misses        838      838           
  Partials       21       21           

@Shinigami92
Copy link
Member

This is for rendering in VSCode tooltips

Therefore I assume instead of changing the source text, we need to somehow fix the docs automatisation text extractor

@import-brain import-brain added c: docs Improvements or additions to documentation m: datatype Something is referring to the datatype module labels Dec 16, 2022
@matthewmayer
Copy link
Contributor Author

i guess its this method? https://github.com/faker-js/faker/blob/next/scripts/apidoc/utils.ts#L114 but dont really understand what its doing or why there are two cases for a length of 1 or 3?

@matthewmayer
Copy link
Contributor Author

previous PR where this was implemented: https://github.com/faker-js/faker/pull/1270/files

@matthewmayer
Copy link
Contributor Author

I tried fixing the @see extraction, which works OK, although it renders like this in the docs, maybe would be better if the `` rendered as <code></code>

image

@ST-DDT
Copy link
Member

ST-DDT commented Dec 17, 2022

You probably have to call mdToHtml somewhere.

@matthewmayer matthewmayer requested a review from a team December 18, 2022 02:56
@matthewmayer matthewmayer changed the title docs(datatype): fix @see docs(datatype): allow markdown in @see links Dec 18, 2022
Copy link
Member

@ST-DDT ST-DDT left a comment

Choose a reason for hiding this comment

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

Thanks for fixing this.
I only have some minor nitpicking, but other than that this is ready to be merged.

scripts/apidoc/utils.ts Outdated Show resolved Hide resolved
scripts/apidoc/utils.ts Outdated Show resolved Hide resolved
scripts/apidoc/utils.ts Outdated Show resolved Hide resolved
scripts/apidoc/utils.ts Outdated Show resolved Hide resolved
scripts/apidoc/utils.ts Show resolved Hide resolved
@ST-DDT ST-DDT added p: 1-normal Nothing urgent s: accepted Accepted feature / Confirmed bug labels Dec 18, 2022
ST-DDT
ST-DDT previously approved these changes Dec 22, 2022
@ST-DDT ST-DDT requested review from a team December 22, 2022 00:48
scripts/apidoc/signature.ts Show resolved Hide resolved
scripts/apidoc/signature.ts Outdated Show resolved Hide resolved
scripts/apidoc/signature.ts Outdated Show resolved Hide resolved
Matt Mayer and others added 3 commits December 24, 2022 10:52
Co-authored-by: Shinigami <chrissi92@hotmail.de>
Co-authored-by: Shinigami <chrissi92@hotmail.de>
Co-authored-by: Shinigami <chrissi92@hotmail.de>
Shinigami92
Shinigami92 previously approved these changes Dec 24, 2022
ST-DDT
ST-DDT previously approved these changes Dec 24, 2022
@ST-DDT ST-DDT enabled auto-merge (squash) December 25, 2022 16:18
@ST-DDT
Copy link
Member

ST-DDT commented Dec 25, 2022

The snapshots need updating after the last typedoc/vitepress update

auto-merge was automatically disabled December 26, 2022 02:17

Head branch was pushed to by a user without write access

@matthewmayer matthewmayer dismissed stale reviews from ST-DDT and Shinigami92 via e995cf1 December 26, 2022 02:17
@ST-DDT
Copy link
Member

ST-DDT commented Dec 26, 2022

The PR is still failing.

@ST-DDT ST-DDT enabled auto-merge (squash) December 26, 2022 12:42
@ST-DDT ST-DDT merged commit 3793ec1 into faker-js:next Dec 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: docs Improvements or additions to documentation m: datatype Something is referring to the datatype module p: 1-normal Nothing urgent s: accepted Accepted feature / Confirmed bug
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

5 participants