Skip to content

Commit 9953c16

Browse files
committed
ensure filter paths are resolved relative to project
1 parent e67ce56 commit 9953c16

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

src/command/render/filters.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ import { quartoConfig } from "../../core/quarto.ts";
8585
import { metadataNormalizationFilterActive } from "./normalize.ts";
8686
import { kCodeAnnotations } from "../../format/html/format-html-shared.ts";
8787
import { projectOutputDir } from "../../project/project-shared.ts";
88-
import { relative } from "../../deno_ral/path.ts";
88+
import { join, relative } from "../../deno_ral/path.ts";
8989
import { citeIndexFilterParams } from "../../project/project-cites.ts";
9090
import { debug } from "../../deno_ral/log.ts";
9191
import { kJatsSubarticle } from "../../format/jats/format-jats-types.ts";
@@ -746,14 +746,17 @@ export async function resolveFilters(
746746
.filter((f) => f !== "quarto") // remove quarto marker
747747
.map((filter, i) => {
748748
if (isFilterEntryPoint(filter)) {
749-
return filter; // send entry-point-style filters unchanged
749+
return {
750+
...filter,
751+
path: join(options.project.dir, filter.path),
752+
}; // send entry-point-style filters unchanged
750753
}
751754
const at = quartoLoc > i ? kQuartoPre : kQuartoPost;
752755
const result: QuartoFilterEntryPoint = typeof filter === "string"
753756
? {
754757
"at": at,
755758
"type": filter.endsWith(".lua") ? "lua" : "json",
756-
"path": filter,
759+
"path": join(options.project.dir, filter),
757760
}
758761
: {
759762
"at": at,

0 commit comments

Comments
 (0)