Skip to content

Commit 84b751b

Browse files
minimal: true should disable brand, not crash
fixes #13383 v1.7 introduced this code implementing the light, dark, light stylesheet trick for syntax highlighting css. it should not try to do this if there are no stylesheets! we did not see the bug trigger until v1.8 which treats brand data as possibly implementing both light and dark decided when we see theme.
1 parent e858bba commit 84b751b

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

src/command/render/pandoc-html.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -325,11 +325,11 @@ export async function resolveSassBundles(
325325
"dark",
326326
defaultStyle,
327327
);
328-
if (defaultStyle === "light") {
328+
if (defaultStyle === "light" && lightEntry) {
329329
const dep2 = extras.html?.[kDependencies]?.find((extraDep) =>
330330
extraDep.name === kQuartoHtmlDependency
331331
);
332-
assert(dep2?.stylesheets && lightEntry);
332+
assert(dep2?.stylesheets);
333333
dep2.stylesheets.push({
334334
...lightEntry,
335335
attribs: {
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
title: "Reproducible Quarto Document"
3+
format:
4+
html:
5+
minimal: true
6+
brand:
7+
color:
8+
background: '#cfc'
9+
---
10+
11+
This is minimal

0 commit comments

Comments
 (0)