Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/lib/study-backrefs.js
Original file line number Diff line number Diff line change
Expand Up @@ -240,12 +240,12 @@ function studyBackrefs (edResults, trResults = [], htmlFragments = {}) {
const recordAnomaly = recordCategorizedAnomaly(report, 'links', possibleAnomalies);

edResults.forEach(spec => {
Object.keys(spec.links || {})
Object.keys(spec.links?.rawlinks || {})
.filter(matchSpecUrl)
.forEach(link => {
let shortname;
if (spec.links[link].specShortname) {
shortname = spec.links[link].specShortname;
if (spec.links.rawlinks[link].specShortname) {
shortname = spec.links.rawlinks[link].specShortname;
} else {
let nakedLink = link;
if (nakedLink.endsWith('.html')) {
Expand Down Expand Up @@ -348,7 +348,7 @@ function studyBackrefs (edResults, trResults = [], htmlFragments = {}) {
const ids = sourceSpec.ids || [];

// Check anchors
const anchors = spec.links[link].anchors || [];
const anchors = spec.links.rawlinks[link].anchors || [];
for (const anchor of anchors) {
const baseLink = (sourceSpec.nightly?.url === link || sourceSpec.nightly?.pages?.includes(link)) ? link : sourceSpec.nightly?.url;
const matchFullNightlyLink = matchAnchor(baseLink, anchor);
Expand Down
4 changes: 2 additions & 2 deletions src/lib/study-crawl.js
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ function studyCrawlResults(results, options = {}) {
// Links to external specifications within the body of the spec
// that do not have a corresponding entry in the references
// (all links to external specs should have a companion ref)
missingLinkRef: Object.keys(spec.links)
missingLinkRef: Object.keys(spec.links.rawlinks || {})
.filter(matchSpecUrl)
.filter(l => {
// Filter out "good" and "inconsistent" references
Expand All @@ -293,7 +293,7 @@ function studyCrawlResults(results, options = {}) {
// which the reference uses a different URL, e.g. because the
// link targets the Editor's Draft, whereas the reference
// targets the latest published version
inconsistentRef: Object.keys(spec.links)
inconsistentRef: Object.keys(spec.links.rawlinks || {})
.filter(matchSpecUrl)
.map(l => {
const canonSimple = canonicalizeUrl(l);
Expand Down
2 changes: 1 addition & 1 deletion test/study-backrefs.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const populateSpec = (url, ids, links, dfns) => {
return {
url: toTr(url),
ids,
links,
links: { rawlinks: links},
dfns,
nightly: {
url
Expand Down