Skip to content

Commit 9aa6a0d

Browse files
Normalize file paths in deadLinkChecker and update documentation links for clarity
1 parent 7cc1c36 commit 9aa6a0d

File tree

3 files changed

+983
-63
lines changed

3 files changed

+983
-63
lines changed

scripts/deadLinkChecker.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,9 @@ async function buildAnchorMap(files) {
8080
const content = await readFileWithCache(filePath);
8181
const anchors = extractAnchorsFromContent(content);
8282
if (anchors.size > 0) {
83-
anchorMap.set(filePath, anchors);
83+
// Normalize path to use consistent separators
84+
const normalizedPath = path.normalize(filePath);
85+
anchorMap.set(normalizedPath, anchors);
8486
}
8587
}
8688
}
@@ -244,7 +246,9 @@ async function validateLink(link) {
244246
}
245247
}
246248

247-
const fileAnchors = anchorMap.get(targetFile);
249+
// Normalize target file path for comparison with anchorMap keys
250+
const normalizedTargetFile = path.normalize(targetFile);
251+
const fileAnchors = anchorMap.get(normalizedTargetFile);
248252

249253
if (!fileAnchors || !fileAnchors.has(anchorId)) {
250254
return {

src/content/blog/2024/10/21/react-compiler-beta-release.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ React Compiler can also be used to compile libraries. Because React Compiler nee
8686

8787
Because your code is pre-compiled, users of your library will not need to have the compiler enabled in order to benefit from the automatic memoization applied to your library. If your library targets apps not yet on React 19, specify a minimum `target` and add `react-compiler-runtime` as a direct dependency. The runtime package will use the correct implementation of APIs depending on the application's version, and polyfill the missing APIs if necessary.
8888

89-
[You can find more docs on this here.](/reference/react-compiler/target#using-the-compiler-on-libraries)
89+
[You can find more docs on this here.](/reference/react-compiler/target#targeting-react-17-or-18)
9090

9191
## Opening up React Compiler Working Group to everyone {/*opening-up-react-compiler-working-group-to-everyone*/}
9292

0 commit comments

Comments
 (0)