Skip to content

Commit 81849de

Browse files
committed
Merge branch 'main' of github.com:quarto-dev/quarto-cli into main
2 parents ed27f30 + f3d8623 commit 81849de

File tree

7 files changed

+23
-8
lines changed

7 files changed

+23
-8
lines changed

src/command/render/pandoc-html-dependencies.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ function domDependencyInjector(
253253
afterBody?: boolean,
254254
) => {
255255
const scriptEl = doc.createElement("script");
256-
scriptEl.setAttribute("src", href);
256+
scriptEl.setAttribute("src", pathWithForwardSlashes(href));
257257
injectEl(scriptEl, attribs, afterBody);
258258
};
259259

@@ -263,7 +263,7 @@ function domDependencyInjector(
263263
afterBody?: boolean,
264264
) => {
265265
const linkEl = doc.createElement("link");
266-
linkEl.setAttribute("href", href);
266+
linkEl.setAttribute("href", pathWithForwardSlashes(href));
267267
linkEl.setAttribute("rel", "stylesheet");
268268
injectEl(linkEl, attribs, afterBody);
269269
};
@@ -274,7 +274,7 @@ function domDependencyInjector(
274274
type?: string,
275275
) => {
276276
const linkEl = doc.createElement("link");
277-
linkEl.setAttribute("href", href);
277+
linkEl.setAttribute("href", pathWithForwardSlashes(href));
278278
linkEl.setAttribute("rel", rel);
279279
if (type) {
280280
linkEl.setAttribute("type", type);
@@ -378,7 +378,9 @@ function lineDependencyInjector(
378378
if (!type) {
379379
type = "";
380380
}
381-
lines.push(rawLinkTemplate({ href, type, rel }));
381+
lines.push(
382+
rawLinkTemplate({ href: pathWithForwardSlashes(href), type, rel }),
383+
);
382384
};
383385

384386
const injectHtml = (html: string) => {

src/command/tools/cmd.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ Use 'quarto tools' with no arguments to show the status of all tools.`,
5656
)
5757
.example(
5858
"Show tool status",
59-
"quarto tools",
59+
"quarto tools list",
6060
)
6161
// deno-lint-ignore no-explicit-any
6262
.action(async (_options: any, command: string, tool?: string) => {

src/format/html/format-html-shared.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,8 @@ export function setMainColumn(doc: Document, column: string) {
339339
"main.content",
340340
".page-navigation",
341341
".quarto-banner-title-block .quarto-title",
342+
"div[class^='quarto-about-']",
343+
"div[class*=' quarto-about-']",
342344
];
343345
selectors.forEach((selector) => {
344346
const el = doc.querySelector(selector);

src/format/reveal/format-reveal.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -645,15 +645,17 @@ function applyStretch(doc: Document, autoStretch: boolean) {
645645
const image = images[0];
646646
const imageEl = image as Element;
647647

648-
// screen out early specials divs (layout panels, columns, fragments, ...)
649648
if (
649+
// screen out early specials divs (layout panels, columns, fragments, ...)
650650
findParent(imageEl, (el: Element) => {
651651
return el.classList.contains("column") ||
652652
el.classList.contains("quarto-layout-panel") ||
653653
el.classList.contains("fragment") ||
654654
el.classList.contains(kOutputLocationSlide) ||
655655
!!el.className.match(/panel-/);
656-
})
656+
}) ||
657+
// Do not autostrech if an aside is used
658+
slideEl.querySelectorAll("aside").length !== 0
657659
) {
658660
continue;
659661
}

src/resources/rmd/execute.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,7 @@ html_dependencies_as_string <- function(dependencies, files_dir) {
418418
dependencies <- lapply(dependencies, function(dependency) {
419419
dir <- dependency$src$file
420420
if (!is.null(dir)) {
421-
dependency$src$file <- paste(files_dir, basename(dir), sep = "/")
421+
dependency$src$file <- gsub("\\\\", "/", paste(files_dir, basename(dir), sep = "/"))
422422
}
423423
dependency
424424
})

tests/docs/reveal/stretch.qmd

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,4 +234,12 @@ Some content
234234
plot(cars)
235235
```
236236

237+
:::
238+
239+
## With aside on slide {#aside}
240+
241+
![Caption](https://revealjs.com/images/logo/reveal-black-text.svg)
242+
243+
::: {.aside}
244+
Something here as an aside
237245
:::

tests/smoke/render/render-reveal.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,5 +66,6 @@ testRender(input, "revealjs", false, [
6666
"#custom-divs-caption img.r-stretch",
6767
"#custom-divs-knitr img.r-stretch",
6868
"#custom-divs-knitr-caption img.r-stretch",
69+
"#aside img.r-stretch",
6970
]),
7071
]);

0 commit comments

Comments
 (0)