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

fix: issue of internal and exterrnal links in article #2731

Merged
merged 8 commits into from
Nov 26, 2024
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,10 @@ const LinkComponent: CustomComponentMapping['a'] = ({ children, href, title }) =
const decodedUrl = decodeURIComponent(href);
const decodedResolvedUriWithoutAnchor = decodeURIComponent(resolvedUriWithoutAnchor);
const edge = node.outbound_edges.find(
SB-venkatyadavilli marked this conversation as resolved.
Show resolved Hide resolved
edge => edge.uri === decodedUrl || edge.uri === decodedResolvedUriWithoutAnchor,
edge =>
edge.uri === decodedUrl ||
edge.uri === decodedResolvedUriWithoutAnchor ||
edge.uri + '/' === decodedResolvedUriWithoutAnchor,
);

if (edge) {
Expand Down