Skip to content

Commit 8117731

Browse files
authored
Merge branch 'main' into fix/issue11664
2 parents f0fc230 + ca05876 commit 8117731

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+659
-181
lines changed

news/changelog-1.7.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ All changes included in 1.7:
88
- ([#11580](https://github.com/quarto-dev/quarto-cli/issues/11580)): Fix regression with documents containing `categories` fields that are not strings.
99
- ([#11752](https://github.com/quarto-dev/quarto-cli/issues/11752)): Fix regression with non-alphanumeric characters in `categories` preventing correct filtering of listing.
1010
- ([#11561](https://github.com/quarto-dev/quarto-cli/issues/11561)): Fix a regression with `$border-color` that impacted, callouts borders, tabset borders, and table borders of the defaults themes. `$border-color` is now correctly a mixed of `$body-color` and `$body-bg` even for the default theme.
11+
- ([#11943](https://github.com/quarto-dev/quarto-cli/issues/11943)): Fix callout title color on dark theme in revealjs following Revealjs update in quarto 1.6.
1112

1213
## YAML validation
1314

@@ -44,6 +45,7 @@ All changes included in 1.7:
4445
- ([#11578](https://github.com/quarto-dev/quarto-cli/issues/11578)): Typst column layout widths use fractional `fr` units instead of percent `%` units for unitless and default widths in order to fill the enclosing block and not spill outside it.
4546
- ([#11676](https://github.com/quarto-dev/quarto-cli/pull/11676)): Convert unitless image widths from pixels to inches for column layouts.
4647
- ([#11835](https://github.com/quarto-dev/quarto-cli/issues/11835)): Take markdown structure into account when detecting minimum heading level.
48+
- ([#11964](https://github.com/quarto-dev/quarto-cli/issues/11964)): Using panel layout without a crossref label now correctly do not add an empty `#block[]` that was leading to an unnecessary space in output.
4749

4850
## Lua Filters and extensions
4951

package/src/common/cyclic-dependencies.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { runCmd } from "../util/cmd.ts";
1111
import { Configuration, readConfiguration } from "./config.ts";
1212
import { error, info } from "../../../src/deno_ral/log.ts";
1313
import { progressBar } from "../../../src/core/console.ts";
14-
import { md5Hash } from "../../../src/core/hash.ts";
14+
import { md5HashSync } from "../../../src/core/hash.ts";
1515

1616
export function cycleDependenciesCommand() {
1717
return new Command()
@@ -186,7 +186,7 @@ function findCyclicDependencies(
186186
// creates a hash for a set of paths (a cycle)
187187
const hash = (paths: string[]) => {
188188
const string = paths.join(" ");
189-
return md5Hash(string);
189+
return md5HashSync(string);
190190
};
191191

192192
// The current import stack

package/src/common/patches/revealjs-theme-0001-dracula.patch

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
diff --git a/src/resources/formats/revealjs/themes/dracula.scss b/src/resources/formats/revealjs/themes/dracula.scss
2-
index 5330fbc1b..45498dd41 100644
2+
index 5330fbc1b..fe068d9a8 100644
33
--- a/src/resources/formats/revealjs/themes/dracula.scss
44
+++ b/src/resources/formats/revealjs/themes/dracula.scss
5-
@@ -1,106 +1,88 @@
5+
@@ -1,106 +1,90 @@
66
/**
77
* Dracula Dark theme for reveal.js.
88
* Based on https://draculatheme.com
@@ -151,7 +151,9 @@ index 5330fbc1b..45498dd41 100644
151151
- }
152152
+ strong,
153153
+ b {
154-
+ color: var(--r-bold-color);
154+
+ &:not(.callout-title strong, .callout-tile b) {
155+
+ color: var(--r-bold-color);
156+
+ }
155157
+ }
156158
+ em,
157159
+ i,

package/src/common/update-html-dependencies.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1123,7 +1123,9 @@ async function updateGithubSourceCodeDependency(
11231123
await unzip(zipFile, working);
11241124

11251125
await onDownload(working, version);
1126-
if (patches) await applyGitPatches(patches);
1126+
if (patches) {
1127+
await applyGitPatches(patches);
1128+
}
11271129
} else {
11281130
throw new Error(`${versionEnvVar} is not defined`);
11291131
}

src/command/preview/cmd.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ export const previewCommand = new Command()
278278
// get project and preview format
279279
const nbContext = notebookContext();
280280
const project = (await projectContext(dirname(file), nbContext)) ||
281-
singleFileProjectContext(file, nbContext);
281+
(await singleFileProjectContext(file, nbContext));
282282
const formats = await (async () => {
283283
const services = renderServices(nbContext);
284284
try {

src/command/preview/preview.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ export async function previewFormat(
373373
return format;
374374
}
375375
const nbContext = notebookContext();
376-
project = project || singleFileProjectContext(file, nbContext);
376+
project = project || (await singleFileProjectContext(file, nbContext));
377377
formats = formats ||
378378
await withRenderServices(
379379
nbContext,
@@ -485,6 +485,8 @@ export async function renderForPreview(
485485
[],
486486
));
487487

488+
renderResult.context.cleanup();
489+
488490
return {
489491
file,
490492
format: renderResult.files[0].format,

src/command/publish/cmd.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ async function createPublishOptions(
339339

340340
// check for directory (either website or single-file project)
341341
const project = (await projectContext(path, nbContext)) ||
342-
singleFileProjectContext(path, nbContext);
342+
(await singleFileProjectContext(path, nbContext));
343343
if (Deno.statSync(path).isDirectory) {
344344
if (projectIsWebsite(project)) {
345345
input = project;

src/command/render/cmd.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,9 @@ export const renderCommand = new Command()
245245
const services = renderServices(notebookContext());
246246
try {
247247
renderResultInput = relative(Deno.cwd(), walk.path) || ".";
248+
if (renderResult) {
249+
renderResult.context.cleanup();
250+
}
248251
renderResult = await render(renderResultInput, {
249252
services,
250253
flags,
@@ -255,6 +258,7 @@ export const renderCommand = new Command()
255258

256259
// check for error
257260
if (renderResult.error) {
261+
renderResult.context.cleanup();
258262
throw renderResult.error;
259263
}
260264
} finally {
@@ -275,6 +279,10 @@ export const renderCommand = new Command()
275279
if (finalOutput) {
276280
info("Output created: " + finalOutput + "\n");
277281
}
282+
283+
if (renderResult) {
284+
renderResult.context.cleanup();
285+
}
278286
}
279287
} else {
280288
throw new Error(`No valid input files passed to render`);

src/command/render/defaults.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,12 @@ export async function generateDefaults(
3939
let allDefaults: FormatPandoc | undefined;
4040

4141
if (options.format.pandoc) {
42-
allDefaults = (options.format.pandoc
43-
? ld.cloneDeep(options.format.pandoc)
44-
: {}) as FormatPandoc;
42+
allDefaults = {
43+
...(options.format.pandoc || {}),
44+
variables: {
45+
...(options.format.pandoc?.variables || {}),
46+
},
47+
} as FormatPandoc;
4548

4649
// resolve filters
4750
const resolvedFilters = await resolveFilters(

src/command/render/filters.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -713,6 +713,7 @@ function initFilterParams(dependenciesFile: string) {
713713
const kQuartoFilterMarker = "quarto";
714714
const kQuartoCiteProcMarker = "citeproc";
715715

716+
// NB: this mutates `pandoc.citeproc`
716717
export async function resolveFilters(
717718
filters: QuartoFilter[],
718719
options: PandocOptions,

0 commit comments

Comments
 (0)