Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions news/changelog-1.9.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,3 +178,4 @@ All changes included in 1.9:
- ([#13997](https://github.com/quarto-dev/quarto-cli/issues/13997)): Fix Windows dart-sass theme compilation failing when Quarto is installed in a path with spaces (e.g., `C:\Program Files\`) and the project path also contains spaces.
- ([#13998](https://github.com/quarto-dev/quarto-cli/issues/13998)): Fix YAML validation error with CR-only line terminators (old Mac format). Documents using `\r` line endings no longer fail with "Expected YAML front matter to contain at least 2 lines".
- ([#14012](https://github.com/quarto-dev/quarto-cli/issues/14012)): Add `fr-CA` language translation for Quebec French inclusive writing conventions, using parenthetical forms instead of middle dots for author labels. (author: @tdhock)
- ([#14032](https://github.com/quarto-dev/quarto-cli/issues/14032)): Add `editor_options` with `chunk_output_type` to YAML schema for autocompletion and validation in RStudio and Positron.
41 changes: 33 additions & 8 deletions src/resources/editor/tools/vs-code.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -14477,6 +14477,26 @@ var require_yaml_intelligence_resources = __commonJS({
},
description: "Visual editor configuration"
},
{
name: "editor_options",
schema: {
object: {
properties: {
chunk_output_type: {
enum: [
"inline",
"console"
],
description: "Determines where chunk output is shown in the editor."
}
}
}
},
description: {
short: "Editor-specific options (used by RStudio and Positron).",
long: "Editor-specific options that control IDE behavior for this document.\nThese options are used by RStudio and Positron to configure\nper-document editor settings.\n"
}
},
{
name: "zotero",
schema: {
Expand Down Expand Up @@ -25075,7 +25095,12 @@ var require_yaml_intelligence_resources = __commonJS({
"Disambiguating year suffix in author-date styles (e.g. \u201Ca\u201D in \u201CDoe,\n1999a\u201D).",
"Manuscript configuration",
"internal-schema-hack",
"List execution engines you want to give priority when determining\nwhich engine should render a notebook. If two engines have support for a\nnotebook, the one listed earlier will be chosen. Quarto\u2019s default order\nis \u2018knitr\u2019, \u2018jupyter\u2019, \u2018markdown\u2019, \u2018julia\u2019."
"List execution engines you want to give priority when determining\nwhich engine should render a notebook. If two engines have support for a\nnotebook, the one listed earlier will be chosen. Quarto\u2019s default order\nis \u2018knitr\u2019, \u2018jupyter\u2019, \u2018markdown\u2019, \u2018julia\u2019.",
{
short: "Editor-specific options (used by RStudio and Positron).",
long: "Editor-specific options that control IDE behavior for this document.\nThese options are used by RStudio and Positron to configure per-document\neditor settings."
},
"Determines where chunk output is shown in the editor."
],
"schema/external-schemas.yml": [
{
Expand Down Expand Up @@ -25305,12 +25330,12 @@ var require_yaml_intelligence_resources = __commonJS({
mermaid: "%%"
},
"handlers/mermaid/schema.yml": {
_internalId: 221789,
_internalId: 221795,
type: "object",
description: "be an object",
properties: {
"mermaid-format": {
_internalId: 221781,
_internalId: 221787,
type: "enum",
enum: [
"png",
Expand All @@ -25326,7 +25351,7 @@ var require_yaml_intelligence_resources = __commonJS({
exhaustiveCompletions: true
},
theme: {
_internalId: 221788,
_internalId: 221794,
type: "anyOf",
anyOf: [
{
Expand Down Expand Up @@ -25623,7 +25648,7 @@ function locationString(loc) {

// ../text.ts
function lines(text) {
return text.split(/\r?\n/);
return text.split(/\r\n?|\n/);
}
function* matchAll(text, regexp) {
if (!regexp.global) {
Expand All @@ -25636,7 +25661,7 @@ function* matchAll(text, regexp) {
}
function* lineOffsets(text) {
yield 0;
for (const match of matchAll(text, /\r?\n/g)) {
for (const match of matchAll(text, /\r\n?|\n/g)) {
yield match.index + match[0].length;
}
}
Expand Down Expand Up @@ -25822,7 +25847,7 @@ function matchAll2(str2, regex) {
return result;
}
function rangedLines(text, includeNewLines = false) {
const regex = /\r?\n/g;
const regex = /\r\n?|\n/g;
const result = [];
let startOffset = 0;
if (!includeNewLines) {
Expand Down Expand Up @@ -34695,7 +34720,7 @@ async function breakQuartoMd(src, validate2 = false, lenient = false, startCodeC
};
const yamlRegEx = /^---\s*$/;
const startCodeCellRegEx = startCodeCellRegex || new RegExp(
"^\\s*(```+)\\s*\\{([=A-Za-z]+)( *[ ,].*)?\\}\\s*$"
"^\\s*(```+)\\s*\\{([=A-Za-z][=A-Za-z0-9._]*)( *[ ,].*)?\\}\\s*$"
);
const startCodeRegEx = /^```/;
const endCodeRegEx = /^\s*(```+)\s*$/;
Expand Down

Large diffs are not rendered by default.

41 changes: 33 additions & 8 deletions src/resources/editor/tools/yaml/web-worker.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

33 changes: 29 additions & 4 deletions src/resources/editor/tools/yaml/yaml-intelligence-resources.json
Original file line number Diff line number Diff line change
Expand Up @@ -7449,6 +7449,26 @@
},
"description": "Visual editor configuration"
},
{
"name": "editor_options",
"schema": {
"object": {
"properties": {
"chunk_output_type": {
"enum": [
"inline",
"console"
],
"description": "Determines where chunk output is shown in the editor."
}
}
}
},
"description": {
"short": "Editor-specific options (used by RStudio and Positron).",
"long": "Editor-specific options that control IDE behavior for this document.\nThese options are used by RStudio and Positron to configure\nper-document editor settings.\n"
}
},
{
"name": "zotero",
"schema": {
Expand Down Expand Up @@ -18047,7 +18067,12 @@
"Disambiguating year suffix in author-date styles (e.g. “a” in “Doe,\n1999a”).",
"Manuscript configuration",
"internal-schema-hack",
"List execution engines you want to give priority when determining\nwhich engine should render a notebook. If two engines have support for a\nnotebook, the one listed earlier will be chosen. Quarto’s default order\nis ‘knitr’, ‘jupyter’, ‘markdown’, ‘julia’."
"List execution engines you want to give priority when determining\nwhich engine should render a notebook. If two engines have support for a\nnotebook, the one listed earlier will be chosen. Quarto’s default order\nis ‘knitr’, ‘jupyter’, ‘markdown’, ‘julia’.",
{
"short": "Editor-specific options (used by RStudio and Positron).",
"long": "Editor-specific options that control IDE behavior for this document.\nThese options are used by RStudio and Positron to configure per-document\neditor settings."
},
"Determines where chunk output is shown in the editor."
],
"schema/external-schemas.yml": [
{
Expand Down Expand Up @@ -18277,12 +18302,12 @@
"mermaid": "%%"
},
"handlers/mermaid/schema.yml": {
"_internalId": 221789,
"_internalId": 221795,
"type": "object",
"description": "be an object",
"properties": {
"mermaid-format": {
"_internalId": 221781,
"_internalId": 221787,
"type": "enum",
"enum": [
"png",
Expand All @@ -18298,7 +18323,7 @@
"exhaustiveCompletions": true
},
"theme": {
"_internalId": 221788,
"_internalId": 221794,
"type": "anyOf",
"anyOf": [
{
Expand Down
14 changes: 14 additions & 0 deletions src/resources/schema/document-editor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,20 @@
for the saved document be already running). This option currently works only within VS Code.
description: Visual editor configuration

- name: editor_options
schema:
object:
properties:
chunk_output_type:
enum: [inline, console]
description: "Determines where chunk output is shown in the editor."
description:
short: "Editor-specific options (used by RStudio and Positron)."
long: |
Editor-specific options that control IDE behavior for this document.
These options are used by RStudio and Positron to configure
per-document editor settings.
- name: zotero
schema:
anyOf:
Expand Down
Loading