Skip to content

Commit a492383

Browse files
committed
don't create xref index on single-file projects
1 parent d2a1ee2 commit a492383

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/command/render/crossref.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export function crossrefFilterParams(
4242
// validation
4343
if (option === kNumberOffset) {
4444
// coerce scalar number-offset to array
45-
if (typeof (value) === "number") {
45+
if (typeof value === "number") {
4646
value = [value];
4747
}
4848
// validate we have an array
@@ -66,7 +66,7 @@ export function crossrefFilterParams(
6666
params[kNumberDepth] = metadata?.[kNumberDepth];
6767

6868
// always create crossref index for projects
69-
if (options.project) {
69+
if (!options.project?.isSingleFile) {
7070
// if its a book then only write for multi-file (as otherwise all of the
7171
// crossref entries will end in a single index file)
7272
if (

0 commit comments

Comments
 (0)