Skip to content

Commit 90da7a8

Browse files
committed
Merge branch 'main' of https://github.com/quarto-dev/quarto-cli into main
2 parents c3864f1 + 24db695 commit 90da7a8

File tree

12 files changed

+91
-34
lines changed

12 files changed

+91
-34
lines changed

src/execute/rmd.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ export const knitrEngine: ExecutionEngine = {
160160
return Promise.resolve();
161161
}, () => {
162162
warning(
163-
`Unable to perform code-link (code-link requires R and the downlit package)`,
163+
`Unable to perform code-link (code-link requires R packages rmarkdown, downlit, and xml2)`,
164164
);
165165
return Promise.resolve();
166166
});

src/extension/extension.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -411,15 +411,16 @@ function readExtension(
411411
function toExtensionId(extension: string) {
412412
if (extension.indexOf("/") > -1) {
413413
const extParts = extension.split("/");
414-
if (extParts.length > 2) {
415-
throw new Error(
416-
"Invalid extension name - this extension name includes the illegal character '/' in its name.",
417-
);
418-
} else {
414+
// Names with organization have exactly 1 slash
415+
if (extParts.length === 2) {
419416
return {
420417
name: extParts[1],
421418
organization: extParts[0],
422419
};
420+
} else {
421+
return {
422+
name: extension,
423+
};
423424
}
424425
} else {
425426
return {

src/resources/editor/tools/vs-code.mjs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7170,7 +7170,10 @@ var require_yaml_intelligence_resources = __commonJS({
71707170
},
71717171
schema: "boolean",
71727172
default: true,
7173-
description: "Evaluate code cells (if `false` just echos the code into output)."
7173+
description: {
7174+
short: "Evaluate code cells (if `false` just echos the code into output).",
7175+
long: "Evaluate code cells (if `false` just echos the code into output).\n\n- `true` (default): evaluate code cell\n- `false`: don't evaluate code cell\n- `[...]`: A list of positive or negative line numbers to selectively include or exclude lines \n (explicit inclusion/excusion of lines is available only when using the knitr engine)\n"
7176+
}
71747177
},
71757178
{
71767179
name: "echo",
@@ -7191,7 +7194,10 @@ var require_yaml_intelligence_resources = __commonJS({
71917194
],
71927195
errorDescription: "be `true`, `false`, or `fenced`"
71937196
},
7194-
description: "Include cell source code in rendered output.\n\n- `true` (default): include source code in output\n- `false`: do not include source code in output\n- `fenced`: in addition to echoing, include the cell delimiter as part of the output.\n"
7197+
description: {
7198+
short: "Include cell source code in rendered output.",
7199+
long: "Include cell source code in rendered output.\n\n- `true` (default): include source code in output\n- `false`: do not include source code in output\n- `fenced`: in addition to echoing, include the cell delimiter as part of the output.\n- `[...]`: A list of positive or negative line numbers to selectively include or exclude lines\n (explicit inclusion/excusion of lines is available only when using the knitr engine)\n"
7200+
}
71957201
},
71967202
{
71977203
name: "code-fold",
@@ -18530,7 +18536,7 @@ var require_yaml_intelligence_resources = __commonJS({
1853018536
"Make speaker notes visible to all viewers",
1853118537
"Change the presentation direction to be RTL",
1853218538
{
18533-
short: "Method used to print tables in Knitr engine documents\n(<code>default</code>, <code>kable</code>, <code>tibble</code>, or\n<code>paged</code>). Defaults to <code>kable</code>.",
18539+
short: "Method used to print tables in Knitr engine documents\n(<code>default</code>, <code>kable</code>, <code>tibble</code>, or\n<code>paged</code>). Uses <code>default</code> if not specified.",
1853418540
long: "Method used to print tables in Knitr engine documents:"
1853518541
},
1853618542
{

src/resources/editor/tools/yaml/web-worker.js

Lines changed: 9 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/resources/editor/tools/yaml/yaml-intelligence-resources.json

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,10 @@
149149
},
150150
"schema": "boolean",
151151
"default": true,
152-
"description": "Evaluate code cells (if `false` just echos the code into output)."
152+
"description": {
153+
"short": "Evaluate code cells (if `false` just echos the code into output).",
154+
"long": "Evaluate code cells (if `false` just echos the code into output).\n\n- `true` (default): evaluate code cell\n- `false`: don't evaluate code cell\n- `[...]`: A list of positive or negative line numbers to selectively include or exclude lines \n (explicit inclusion/excusion of lines is available only when using the knitr engine)\n"
155+
}
153156
},
154157
{
155158
"name": "echo",
@@ -170,7 +173,10 @@
170173
],
171174
"errorDescription": "be `true`, `false`, or `fenced`"
172175
},
173-
"description": "Include cell source code in rendered output.\n\n- `true` (default): include source code in output\n- `false`: do not include source code in output\n- `fenced`: in addition to echoing, include the cell delimiter as part of the output.\n"
176+
"description": {
177+
"short": "Include cell source code in rendered output.",
178+
"long": "Include cell source code in rendered output.\n\n- `true` (default): include source code in output\n- `false`: do not include source code in output\n- `fenced`: in addition to echoing, include the cell delimiter as part of the output.\n- `[...]`: A list of positive or negative line numbers to selectively include or exclude lines\n (explicit inclusion/excusion of lines is available only when using the knitr engine)\n"
179+
}
174180
},
175181
{
176182
"name": "code-fold",
@@ -11509,7 +11515,7 @@
1150911515
"Make speaker notes visible to all viewers",
1151011516
"Change the presentation direction to be RTL",
1151111517
{
11512-
"short": "Method used to print tables in Knitr engine documents\n(<code>default</code>, <code>kable</code>, <code>tibble</code>, or\n<code>paged</code>). Defaults to <code>kable</code>.",
11518+
"short": "Method used to print tables in Knitr engine documents\n(<code>default</code>, <code>kable</code>, <code>tibble</code>, or\n<code>paged</code>). Uses <code>default</code> if not specified.",
1151311519
"long": "Method used to print tables in Knitr engine documents:"
1151411520
},
1151511521
{

src/resources/filters/quarto-post/ipynb.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ function ipynb()
1919
local renderedBlocks = compileTemplate(titleBlockTemplate, doc.meta)
2020

2121
-- prepend the blocks to the notebook
22-
tprepend(doc.blocks, renderedBlocks.blocks )
22+
tprepend(doc.blocks, renderedBlocks)
2323

2424
return doc
2525

src/resources/formats/html/_quarto-rules.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ h6:hover > .anchorjs-link,
140140
#title-block-header {
141141
margin-block-end: 1rem;
142142
position: relative;
143+
margin-top: -1px; // Chrome draws 1px white line between navbar and title block
143144
}
144145

145146
#title-block-header .abstract {

src/resources/formats/html/bootstrap/_bootstrap-rules.scss

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1549,6 +1549,9 @@ nav[role="doc-toc"].slow > * {
15491549
padding: 1em;
15501550
border: solid 1px $border-color;
15511551
margin-bottom: 1em;
1552+
code.sourceCode {
1553+
white-space: pre-wrap;
1554+
}
15521555
}
15531556

15541557
.quarto-appendix-citeas {

src/resources/formats/html/ojs/quarto-ojs-runtime.js

Lines changed: 27 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17343,15 +17343,34 @@ class EmptyInspector {
1734317343

1734417344
// here we need to convert from an ES6 module to an observable module
1734517345
// in, well, a best-effort kind of way.
17346-
function es6ImportAsObservableModule(m) {
17346+
function es6ImportAsObservableModule(modulePromise, specs) {
17347+
const promiseMap = {};
17348+
const resolveMap = {};
17349+
specs.forEach(spec => {
17350+
promiseMap[spec] = new Promise((resolve, reject) => { resolveMap[spec] = { resolve, reject }; });
17351+
});
17352+
modulePromise.then(m => {
17353+
specs.forEach(spec => {
17354+
resolveMap[spec].resolve(m[spec]);
17355+
});
17356+
}).catch(error => {
17357+
specs.forEach(spec => {
17358+
resolveMap[spec].reject(error);
17359+
});
17360+
});
1734717361
return function (runtime, observer) {
1734817362
const main = runtime.module();
1734917363

17364+
specs.forEach(key => {
17365+
main.variable(observer(key)).define(key, [], () => promiseMap[key]);
17366+
});
17367+
/*
1735017368
Object.keys(m).forEach((key) => {
1735117369
const v = m[key];
17352-
main.variable(observer(key)).define(key, [], () => v);
17353-
});
1735417370

17371+
main.variable(observer(key)).define(key, [], () => promiseMap[key]v);
17372+
});
17373+
*/
1735517374
return main;
1735617375
};
1735717376
}
@@ -17512,7 +17531,7 @@ function importPathResolver(paths, localResolverMap) {
1751217531
return path;
1751317532
}
1751417533

17515-
return async (path) => {
17534+
return async (path, specs) => {
1751617535
const isLocalModule = path.startsWith("/") || path.startsWith(".");
1751717536
const isImportFromObservableWebsite = path.match(
1751817537
/^https:\/\/(api\.|beta\.|)observablehq\.com\//i,
@@ -17562,8 +17581,8 @@ function importPathResolver(paths, localResolverMap) {
1756217581

1756317582
if (moduleType === "ts" || moduleType === "tsx") {
1756417583
try {
17565-
const m = await import(importPath.replace(/\.ts$/, ".js").replace(/\.tsx$/, ".js"));
17566-
return es6ImportAsObservableModule(m);
17584+
const modulePromise = import(importPath.replace(/\.ts$/, ".js").replace(/\.tsx$/, ".js"));
17585+
return es6ImportAsObservableModule(modulePromise, specs);
1756717586
} catch (e) {
1756817587
// record the error on the browser console to make debugging
1756917588
// slightly more convenient.
@@ -17572,8 +17591,8 @@ function importPathResolver(paths, localResolverMap) {
1757217591
}
1757317592
} else if (moduleType === "js") {
1757417593
try {
17575-
const m = await import(importPath);
17576-
return es6ImportAsObservableModule(m);
17594+
const modulePromise = import(importPath);
17595+
return es6ImportAsObservableModule(modulePromise, specs);
1757717596
} catch (e) {
1757817597
// record the error on the browser console to make debugging
1757917598
// slightly more convenient.

src/resources/formats/html/ojs/quarto-ojs-runtime.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)