Skip to content
Open
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
1 change: 1 addition & 0 deletions news/changelog-1.9.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ All changes included in 1.9:
- Two-column layout now uses `set page(columns:)` instead of `columns()` function, fixing compatibility with landscape sections.
- Title block now properly spans both columns in multi-column layouts.
- ([#13870](https://github.com/quarto-dev/quarto-cli/issues/13870)): Add support for `alt` attribute on cross-referenced equations for improved accessibility. (author: @mcanouil)
- ([#13942](https://github.com/quarto-dev/quarto-cli/issues/13942)): Fix Typst compilation errors showing confusing internal stack traces. Users now see only the relevant Typst error message.

### `pdf`

Expand Down
4 changes: 2 additions & 2 deletions src/command/render/output-typst.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import {
kVariant,
} from "../../config/constants.ts";
import { error, warning } from "../../deno_ral/log.ts";
import { ErrorEx } from "../../core/lib/error.ts";
import { Format } from "../../config/types.ts";
import { writeFileToStdout } from "../../core/console.ts";
import { dirAndStem, expandPath } from "../../core/path.ts";
Expand Down Expand Up @@ -161,11 +162,10 @@ export function typstPdfOutputRecipe(
typstOptions,
);
if (!result.success) {
// Log the error so test framework can detect it via shouldError
if (result.stderr) {
error(result.stderr);
}
throw new Error("Typst compilation failed");
throw new ErrorEx("Error", "Typst compilation failed", false, false);
}

// Validate PDF against specified standards using verapdf (if available)
Expand Down
6 changes: 5 additions & 1 deletion tests/smoke/smoke-all.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,11 @@ function resolveTestSpecs(
verifyFns.push(verifyMap[key](outputFile.outputPath, ...value));
}
} else if (key === "printsMessage") {
verifyFns.push(verifyMap[key](value));
// Support both single object and array of printsMessage checks
const messages = Array.isArray(value) ? value : [value];
for (const msg of messages) {
verifyFns.push(verifyMap[key](msg));
}
} else if (key === "ensureEpubFileRegexMatches") {
// this ensure function is special because it takes an array of path + regex specifiers,
// so we should never use the spread operator
Expand Down
Loading