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

Update markdown-to-jsx version to fix url links in comments #15083

Conversation

TheMightyPenguin
Copy link
Contributor

Issue: #14176

What I did

There was an issue with markdown-to-jsx, in that it was generating a link twice, when compodocs already generated an anchor tag for a given URL string. So when markdown-to-jsx would see this:

<a href="https://example.com">
  https://example.com
</a>

It would then generate the following:

<a href="https://example.com">
  <a href="https://example.com">
    https://example.com
  </a>
</a>

As it adds an anchor tag automatically when it sees a URL link in text.

I issued a PR to markdown-to-jsx fixing the duplicated nested link issue (quantizor/markdown-to-jsx#381), it was merged a few days ago. This PR updates the version of the library to apply the fix on this side.

How to test

  1. Add a JSDoc comment with links to the ChipsGroup component on the angular-cli example:

It could be something like:

  /**
   * This is a test
   * https://example.com
   */
  1. Run the angular-cli example using yarn storybook, and go to the ChipsGroup docs page: http://localhost:9008/?path=/docs/basics-ngmodule-module-with-multiple-component--chips-group
  2. Validate that the link is generated, and that upon inspecting the DOM elements, there's a single a element present.

@nx-cloud
Copy link

nx-cloud bot commented May 28, 2021

Nx Cloud Report

CI ran the following commands for commit 1ff23d6. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this branch

Status Command
#000000 nx run-many --target=prepare --all --parallel --max-parallel=15

Sent with 💌 from NxCloud.

Copy link
Member

@shilman shilman left a comment

Choose a reason for hiding this comment

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

Thank you @TheMightyPenguin !!! 🙏 Great work 💪

@shilman shilman merged commit 2ec1bdd into storybookjs:next May 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants