Skip to content

Fix related link format #5312

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

Merged
merged 3 commits into from
Aug 20, 2021
Merged

Fix related link format #5312

merged 3 commits into from
Aug 20, 2021

Conversation

atesgoral
Copy link
Contributor

The Further Reading section on https://webpack.js.org/guides/code-splitting/ has a dangling >:

image

Fixing this by converting the HTML entities to the actual angle brackets:

image

Note: The last item in this list completely omits the <link> and just mentions rel="preload", so it could also be a good idea to standardize either using a <link> or not.

@vercel
Copy link

vercel bot commented Aug 20, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/webpack-docs/webpack-js-org/AjPWG99LyU5yaqHjxuxByN5L8DsD
✅ Preview: https://webpack-js-org-git-fork-atesgoral-fix-link-format-webpack-docs.vercel.app

@chenxsan chenxsan marked this pull request as ready for review August 20, 2021 11:44
Copy link
Member

@chenxsan chenxsan 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 for your contribution!

@chenxsan chenxsan merged commit 84a5964 into webpack:master Aug 20, 2021
@atesgoral
Copy link
Contributor Author

@chenxsan I was going to dive deeper into this linting error, but thanks for jumping in and tweaking it!

My hesitancy was due to two things:

  1. Why is the markdown linter linting the frontmatter? It's supposed to be metadata whose syntax should be treated differently than the actual MDX content. I feel like this is a problem with the linter or its configuration.
  2. Since <link> elements are meant to be non-self-closing in the HTML context, and since webpack is a generic bundling tool that is not married to React/JSX, should webpack documentation really bend to the MDX linter's will?

I think there's going to be a better tweak (perhaps at linter configuration level) to this collaborative quick patch we shipped :) I might take a stab at it later, just to sate my curiosity...

@atesgoral atesgoral deleted the fix-link-format branch August 20, 2021 13:49
@chenxsan
Copy link
Member

@atesgoral Regarding your second concern, here's an explanation for why we would migrate to MDX #4412 (comment) considering this site is actually an application built with React :) Generally, MDX improves the performance a lot because we can take advantage of MDX's MDXProvider.

And yes, it seems to be a bug in eslint-mdx. Let me know if you come to any conclusion. Or I can file an issue over their repository, the maintainer is very kind to help as far as I know.

@atesgoral
Copy link
Contributor Author

@chenxsan I couldn't figure out how to tweak the ESLint configuration to make the problem go away.

@chenxsan
Copy link
Member

@astonizer I've filed an issue over the eslint-mdx repository, we'll see if it's a bug in it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants