Skip to content

Commit

Permalink
Trim 'index.html' away from fragment redirect expected URLs
Browse files Browse the repository at this point in the history
  • Loading branch information
Munter committed Nov 5, 2019
1 parent 503e126 commit 9973d69
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -692,11 +692,16 @@ async function hyperlink(
fromUrlOrDescription
} of redirectAsset.incomingFragments) {
const to = redirectAsset._redirectTarget;
const expected =
getModifiedHref(href, fromUrl, to.url, ag.root).replace(
'/index.html',
'/'
) + fragment;

const fragmentRedirectReport = {
operator: 'fragment-redirect',
name: `fragment-redirect ${fromUrlOrDescription} --> ${redirectAsset.urlOrDescription}${fragment} --> ${to.urlOrDescription}`,
expected:
getModifiedHref(href, fromUrl, to.url, ag.root) + fragment,
expected,
actual: href,
at: relationDebugDescription
};
Expand Down

0 comments on commit 9973d69

Please sign in to comment.