Skip to content

Commit

Permalink
Use new pandocNativeStr function
Browse files Browse the repository at this point in the history
from #9206
  • Loading branch information
cderv committed Mar 27, 2024
1 parent e10b75d commit d86b4d2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/format/reveal/format-reveal-theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ import { copyMinimal, copyTo } from "../../core/copy.ts";
import { titleSlideScss } from "./format-reveal-title.ts";
import { asCssFont, asCssNumber } from "../../core/css.ts";
import { cssHasDarkModeSentinel } from "../../core/pandoc/css.ts";
import { pandocNativeStr } from "../../core/pandoc/codegen.ts";

export const kRevealLightThemes = [
"white",
Expand Down Expand Up @@ -84,7 +85,7 @@ export async function revealTheme(
const revealUrl = pathWithForwardSlashes(revealDir);
// escape to avoid pandoc markdown parsing from YAML default file
// https://github.com/quarto-dev/quarto-cli/issues/9117
metadata[kRevealJsUrl] = `${'`Str "'}${revealUrl}${'"`'}{=pandoc-native}`;
metadata[kRevealJsUrl] = pandocNativeStr(revealUrl);

// copy reveal dir
const revealSrcDir = revealJsUrl ||
Expand Down
3 changes: 2 additions & 1 deletion src/format/reveal/format-reveal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ import { revealMetadataFilter } from "./metadata.ts";
import { ProjectContext } from "../../project/types.ts";
import { titleSlidePartial } from "./format-reveal-title.ts";
import { registerWriterFormatHandler } from "../format-handlers.ts";
import { pandocNativeStr } from "../../core/pandoc/codegen.ts";

export function revealResolveFormat(format: Format) {
format.metadata = revealMetadataFilter(format.metadata);
Expand Down Expand Up @@ -213,7 +214,7 @@ export function revealjsFormat() {
(script) => {
// escape to avoid pandoc markdown parsing from YAML default file
// https://github.com/quarto-dev/quarto-cli/issues/9117
return `${'`Str "'}${script.path}${'"`'}{=pandoc-native}`;
return pandocNativeStr(script.path);
},
),
} as Metadata,
Expand Down

0 comments on commit d86b4d2

Please sign in to comment.