Skip to content

Commit 500a809

Browse files
author
Al Manning
committed
Merge branch 'main' into feature/conf-proj
2 parents 4781f1d + 41db022 commit 500a809

File tree

111 files changed

+1794
-846
lines changed

Some content is hidden

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

111 files changed

+1794
-846
lines changed

.prettierignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
src/resources/formats/revealjs/plugins/line-highlight/line-highlight.js
2+
src/resources/formats/revealjs/plugins/menu/menu.js
3+
src/resources/formats/revealjs/plugins/menu/quarto-menu.js
4+
src/resources/formats/revealjs/plugins/multiplex/multiplex.js
5+
src/resources/formats/revealjs/plugins/multiplex/socket.io.js
6+
src/resources/formats/revealjs/plugins/pdfexport/pdfexport.js
7+
src/resources/formats/revealjs/plugins/support/support.js
8+
src/resources/formats/revealjs/plugins/tone/tone.js

configuration

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export CLIPBOARD_JS=2.0.11
2727
export TIPPY_JS=6.3.7
2828
export PDF_JS=2.8.335
2929
# Using commit to fix https://github.com/quarto-dev/quarto-cli/issues/2430 - revert to using a release tag when included
30-
export REVEAL_JS=e281b3234e7991283ce4dcca705dd9a6a9ebe5d2
30+
export REVEAL_JS=e281b3234e7991283ce4dcca705dd9a6a9ebe5d2
3131
export REVEAL_JS_MENU=2.1.0
3232
export REVEAL_JS_CHALKBOARD=a88c134e2cf3c7780448db003e7329c3cbd8cfb4
3333
export REVEAL_JS_PDFEXPORT=2.0.1

deno.jsonc

Lines changed: 624 additions & 624 deletions
Large diffs are not rendered by default.

news/changelog-1.3.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
## Knitr engine
1717

1818
- Help rmarkdown find pandoc binary bundled with Quarto if none is found ([#3688](https://github.com/quarto-dev/quarto-cli/issues/3688)).
19+
- Do not bind knitr engine when only inline `r` expressions are found ([#3908](https://github.com/quarto-dev/quarto-cli/issues/3908)).
20+
- Fix an issue with `output: asis` in chunks with plots ([#3683](https://github.com/quarto-dev/quarto-cli/issue3683)).
1921

2022
## Code Annotation
2123

@@ -41,6 +43,7 @@
4143
- Use custom `styles.html` template partial to better support checkbox alignment ([#4556](https://github.com/quarto-dev/quarto-cli/issues/4556)).
4244
- Improve ergonomics of text-highting in HTML output, not emitting difficult overwrite styles and better supporting theme -> CSS conversion. ([#4334](https://github.com/quarto-dev/quarto-cli/issues/4334)).
4345
- Improve CSS of nested tight and loose lists ([#4560](https://github.com/quarto-dev/quarto-cli/discussions/4650)).
46+
- Resolve Bootstrap responsive classes in tables ([#2997](https://github.com/quarto-dev/quarto-cli/issues/2997)).
4447

4548
## Article Layout
4649

@@ -57,6 +60,9 @@
5760
- Properly support `show-notes: separate-page` [#3996](https://github.com/quarto-dev/quarto-cli/issues/3996)
5861
- Improve footnote / aside layout for centered slides. [#4297](https://github.com/quarto-dev/quarto-cli/issues/4297)
5962
- Ensure anchors refer to the containing slide in case of crossrefs ([#3533](https://github.com/quarto-dev/quarto-cli/issues/4297)).
63+
- Support `output-location` as a top level option in Revealjs presentations ([#3261](https://github.com/quarto-dev/quarto-cli/issues/3261))
64+
- Fix PDF export keyboard shortcut and button in menu ([#2988](https://github.com/quarto-dev/quarto-cli/issues/2988))
65+
- Fix title slide CSS when `hash-type: number` ([#4418](https://github.com/quarto-dev/quarto-cli/issues/4418)).
6066

6167
## EPUB Format
6268

@@ -77,6 +83,7 @@
7783
- Note that this fix changes the filenames used for PDF files with variants. In quarto 1.3, the automatic output names for PDF files include format variants and modifiers.
7884
- Correctly download online image on Windows ([#3982](https://github.com/quarto-dev/quarto-cli/issues/3982)).
7985
- Permissions of `.tex` file are now correct when `keep-tex: true` ([#4380](https://github.com/quarto-dev/quarto-cli/issues/4380)).
86+
- Better support footnotes within Callouts in PDF / LaTeX output ([#1235](https://github.com/quarto-dev/quarto-cli/issues/1235)).
8087

8188
## Beamer Format
8289

@@ -157,6 +164,7 @@
157164
## Preview
158165

159166
- Correct redirect for VS Code Server (#3352) (Thank you, @benz0li!)
167+
- Correct redirect for GitHub Codespaces
160168

161169
## LUA
162170

@@ -197,7 +205,9 @@
197205
- Fix typo `thumnail-image` -> `thumbnail-image` in listing template ([#4602](//github.com/quarto-dev/quarto-cli/pull/4602)) (Thank you, @mattspence!).
198206
- Add support for targeting the `#refs` divs with citations when using `natbib` or `biblatex` to generate a bibliography.
199207
- Warn users about Chromium installation issues in WSL ([#4596](https://github.com/quarto-dev/quarto-cli/issues/4586)).
208+
- Fix issue with "No inspectable targets" with Chrome Browser ([#4653](https://github.com/quarto-dev/quarto-cli/issues/4653))
200209
- Add `title` attribute for callouts (can be used rather than heading for defining the title)
210+
- Handle more varieties of raw HTML for Docusaurus output
201211

202212
## Pandoc filter changes
203213

@@ -216,7 +226,8 @@
216226

217227
## Other
218228

219-
- fix error when running the command `quarto render -h` to receive help ([#3202](https://github.com/quarto-dev/quarto-cli/issues/3202)).
229+
- Fix error when running the command `quarto render -h` to receive help ([#3202](https://github.com/quarto-dev/quarto-cli/issues/3202)).
220230
- Fix error when rendering a document with an extension which provides a directory as `format-resources` ([#4377](https://github.com/quarto-dev/quarto-cli/issues/4377)).
221231
- Fix incorrect copying of resource files during rendering ([#4544](https://github.com/quarto-dev/quarto-cli/issues/4544))
222232
- Extension authors may now force files to be included in their template by writing the file / file path in the `.quartoignore` file prefixed with a `!`. For example `!README.md` ([#4061](https://github.com/quarto-dev/quarto-cli/issues/4061)).
233+
- Fix issue when installing extensions on older Windows ([#4203](https://github.com/quarto-dev/quarto-cli/issues/4203)).

package/src/bld.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { configure } from "./common/configure.ts";
1010
import { mainRunner } from "../../src/core/main.ts";
1111

1212
import { prepareDist } from "./common/prepare-dist.ts";
13-
import { updateHtmlDepedencies } from "./common/update-html-dependencies.ts";
13+
import { updateHtmlDependencies } from "./common/update-html-dependencies.ts";
1414
import { makeInstallerDeb } from "./linux/installer.ts";
1515
import { makeInstallerMac } from "./macos/installer.ts";
1616
import {
@@ -64,7 +64,7 @@ function getCommands() {
6464
),
6565
);
6666
commands.push(
67-
packageCommand(updateHtmlDepedencies)
67+
packageCommand(updateHtmlDependencies)
6868
.name("update-html-dependencies")
6969
.description(
7070
"Updates Bootstrap, themes, and JS/CSS dependencies based upon the version in configuration",
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
import { expandGlobSync } from "https://deno.land/[email protected]/fs/mod.ts";
2+
3+
const json = JSON.parse(
4+
Deno.readTextFileSync("package/src/common/deno-meta.json"),
5+
//deno-lint-ignore no-explicit-any
6+
) as any;
7+
const meta = json.meta;
8+
9+
delete json.meta;
10+
11+
let excludes: string[] = [];
12+
for (const file of meta.excludeGlobs) {
13+
const f: string = file;
14+
if (f.includes("*")) {
15+
for (const { path } of expandGlobSync(f)) {
16+
excludes.push(path);
17+
}
18+
} else {
19+
excludes.push(f);
20+
}
21+
}
22+
23+
// drop the current working directory from the paths
24+
excludes = excludes.map((e) => e.replace(Deno.cwd() + "/", ""));
25+
26+
json.lint.files.exclude = excludes;
27+
json.fmt.files.exclude = excludes;
28+
29+
console.log("// auto-generated by package/src/common/create-deno-config.ts");
30+
console.log("// see dev-docs/update-deno_jsonc.md");
31+
console.log(JSON.stringify(json, null, 2));

package/src/common/deno-meta.json

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"meta": {
3+
"comment": "We use this file to create deno.json, specifically because deno lint doesn't support globs",
4+
"excludeGlobs": [
5+
"src/resources/create/extensions/revealjs-plugin/_extensions/qstart-filesafename-qend/qstart-filesafename-qend.js",
6+
"src/resources/editor/",
7+
"src/core/lib/external/",
8+
"src/vendor/",
9+
"src/resources/vendor/",
10+
"src/resources/formats/pdf/pdfjs/",
11+
"src/resources/deno_std/",
12+
"**/*.min.js",
13+
"**/*.umd.js",
14+
"**/*.esm.js",
15+
"src/resources/library/**/*.js",
16+
"src/resources/formats/**/*.js",
17+
"src/resources/projects/website/**/*.js"
18+
]
19+
},
20+
"lint": {
21+
"files": {
22+
"include": ["src/"]
23+
},
24+
"rules": {
25+
"exclude": ["require-await", "no-inferrable-types"]
26+
}
27+
},
28+
"fmt": {
29+
"files": {
30+
"include": ["src/"]
31+
}
32+
}
33+
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
From cdf668f9b164dca04eece54c88eaed4541211335 Mon Sep 17 00:00:00 2001
2+
From: Christophe Dervieux <[email protected]>
3+
Date: Tue, 7 Mar 2023 16:12:53 +0100
4+
Subject: [PATCH] Patch PdfExport RevealJS plugin to export toggle function
5+
6+
This will enable toggling PDF export mode using API
7+
---
8+
src/resources/formats/revealjs/plugins/pdfexport/pdfexport.js | 3 +++
9+
1 file changed, 3 insertions(+)
10+
11+
diff --git a/src/resources/formats/revealjs/plugins/pdfexport/pdfexport.js b/src/resources/formats/revealjs/plugins/pdfexport/pdfexport.js
12+
index c399fa9de..bf9104c8e 100644
13+
--- a/src/resources/formats/revealjs/plugins/pdfexport/pdfexport.js
14+
+++ b/src/resources/formats/revealjs/plugins/pdfexport/pdfexport.js
15+
@@ -101,6 +101,9 @@ var PdfExport = ( function( _Reveal ){
16+
Reveal = _Reveal;
17+
install();
18+
};
19+
+ Plugin.togglePdfExport = function () {
20+
+ togglePdfExport();
21+
+ };
22+
}
23+
24+
return Plugin;
25+
--
26+
2.39.2.windows.1
27+

package/src/common/project-lint.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/bash
2+
3+
# run this from the top-level quarto-cli directory
4+
deno lint -c deno.jsonc 2>&1 | grep ' *at ' | sed "s/:.*$//" | sort | uniq | sort

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

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ import { info } from "log/mod.ts";
1010
import { dirname, extname, join } from "path/mod.ts";
1111
import { lines } from "../../../src/core/text.ts";
1212
import { runCmd } from "../util/cmd.ts";
13-
import { Repo, withRepo } from "../util/git.ts";
13+
import { applyGitPatches, Repo, withRepo } from "../util/git.ts";
1414

1515
import { download, unzip } from "../util/utils.ts";
1616
import { Configuration } from "./config.ts";
1717
import { visitLines } from "../../../src/core/file.ts";
1818
import { copyMinimal } from "../../../src/core/copy.ts";
1919

20-
export async function updateHtmlDepedencies(config: Configuration) {
20+
export async function updateHtmlDependencies(config: Configuration) {
2121
info("Updating Bootstrap with version info:");
2222

2323
// Read the version information from the environment
@@ -57,6 +57,18 @@ export async function updateHtmlDepedencies(config: Configuration) {
5757
"dist",
5858
);
5959

60+
// For applying git patch to what we retreive
61+
const patchesDir = join(
62+
config.directoryInfo.pkg,
63+
"src", "common", "patches"
64+
)
65+
66+
function resolvePatches (patches: string[]) {
67+
return patches.map(patch => {
68+
return join(patchesDir, patch)
69+
})
70+
}
71+
6072
// Anchor
6173
const anchorJs = join(formatDir, "anchor", "anchor.min.js");
6274
await updateUnpkgDependency(
@@ -360,6 +372,7 @@ export async function updateHtmlDepedencies(config: Configuration) {
360372
"plugins",
361373
"pdfexport",
362374
);
375+
363376
await updateGithubSourceCodeDependency(
364377
"reveal-pdfexport",
365378
"McShelby/reveal-pdfexport",
@@ -374,7 +387,10 @@ export async function updateHtmlDepedencies(config: Configuration) {
374387
return Promise.resolve();
375388
},
376389
false, // not a commit
377-
false, // no v prefix
390+
false, // no v prefix,
391+
resolvePatches([
392+
"0001-Patch-PdfExport-RevealJS-plugin-to-export-toggle-fun.patch"
393+
])
378394
);
379395

380396
// Github CSS (used for GFM HTML preview)
@@ -492,6 +508,7 @@ export async function updateHtmlDepedencies(config: Configuration) {
492508
info(
493509
"\n** Done- please commit any files that have been updated. **\n",
494510
);
511+
495512
}
496513

497514
async function updatePdfJs(
@@ -786,9 +803,10 @@ async function updateGithubSourceCodeDependency(
786803
onDownload: (dir: string, version: string) => Promise<void>,
787804
commit = false, // set to true when commit is used instead of a tag
788805
vPrefix = true, // set to false if github tags don't use a v prefix
806+
patches?: string[]
789807
) {
790808
info(`Updating ${name}...`);
791-
const version = Deno.env.get(versionEnvVar);
809+
const version = Deno.env.get(versionEnvVar)?.trim();
792810
if (version) {
793811
const fileName = `${name}.zip`;
794812
const distUrl = join(
@@ -805,6 +823,7 @@ async function updateGithubSourceCodeDependency(
805823
await unzip(zipFile, working);
806824

807825
await onDownload(working, version);
826+
if (patches) await applyGitPatches(patches)
808827
} else {
809828
throw new Error(`${versionEnvVar} is not defined`);
810829
}

0 commit comments

Comments
 (0)