Skip to content

Commit 401b9e2

Browse files
committed
Convert to forward slashes for csl and bib paths
1 parent 1805286 commit 401b9e2

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/project/types/book/book-bibliography.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ export async function bookBibliographyPostRender(
8181

8282
// Fixes https://github.com/quarto-dev/quarto-cli/issues/2755
8383
if (csl) {
84-
const cslAbsPath = join(firstFileDir, csl);
84+
const cslAbsPath = pathWithForwardSlashes(join(firstFileDir, csl));
8585
if (safeExistsSync(cslAbsPath)) {
8686
csl = cslAbsPath;
8787
}
@@ -197,11 +197,13 @@ async function generateBibliographyHTML(
197197

198198
// make the aggregated bibliography
199199
const yaml: Metadata = {
200-
[kBibliography]: biblioPaths,
200+
[kBibliography]: biblioPaths.map(pathWithForwardSlashes),
201201
[kNoCite]: ld.uniq(citeIds).map((id) => "@" + id).join(", "),
202202
};
203203
if (csl) {
204-
yaml[kCsl] = isAbsolute(csl) ? relative(context.dir, csl) : csl;
204+
yaml[kCsl] = isAbsolute(csl)
205+
? pathWithForwardSlashes(relative(context.dir, csl))
206+
: csl;
205207
}
206208
const frontMatter = `---\n${stringify(yaml, { indent: 2 })}\n---\n`;
207209
const result = await execProcess({

0 commit comments

Comments
 (0)