Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: make description consistent with link-external-filter example code #10806

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
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.7.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ All changes included in 1.7:
## `html` format

- ([#11860])(https://github.com/quarto-dev/quarto-cli/issues/11860)): ES6 modules that import other local JS modules in documents with `embed-resources: true` are now correctly embedded.
- ([#10780])(https://github.com/quarto-dev/quarto-cli/issues/10780)): improve `link-external-filter` documentation/example to be more clear and correct.

## `pdf` format

Expand Down
43 changes: 29 additions & 14 deletions src/resources/editor/tools/vs-code.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -16059,7 +16059,7 @@ var require_yaml_intelligence_resources = __commonJS({
schema: "string",
description: {
short: "A regular expression that can be used to determine whether a link is an internal link.",
long: "A regular expression that can be used to determine whether a link is an internal link. For example, \nthe following will treat links that start with http://www.quarto.org as internal links (and others\nwill be considered external):\n\n```\n^(?:http:|https:)\\/\\/www\\.quarto\\.org\\/custom\n```\n"
long: "A regular expression that can be used to determine whether a link is an internal link. For example, \nthe following will treat links that start with `http://www.quarto.org/custom` or `https://www.quarto.org/custom`\nas internal links (and others will be considered external):\n\n```\n^(?:http:|https:)\\/\\/www\\.quarto\\.org\\/custom\n```\n"
}
},
{
Expand Down Expand Up @@ -21651,7 +21651,7 @@ var require_yaml_intelligence_resources = __commonJS({
"Short/abbreviated form of container-title;",
"A minor contributor to the item; typically cited using \u201Cwith\u201D before\nthe name when listed in a bibliography.",
"Curator of an exhibit or collection (e.g. in a museum).",
"Physical (e.g. size) or temporal (e.g.\uFFFD\uFFFDrunning time) dimensions of\nthe item.",
"Physical (e.g. size) or temporal (e.g. running time) dimensions of\nthe item.",
"Director (e.g. of a film).",
"Minor subdivision of a court with a <code>jurisdiction</code> for a\nlegal item",
"(Container) edition holding the item (e.g.&nbsp;\u201C3\u201D when citing a chapter\nin the third edition of a book).",
Expand Down Expand Up @@ -24817,8 +24817,8 @@ function mappedIndexToLineCol(eitherText) {
};
}
function mappedLines(str2, keepNewLines = false) {
const lines3 = rangedLines(str2.value, keepNewLines);
return lines3.map((v) => mappedString(str2, [v.range]));
const lines2 = rangedLines(str2.value, keepNewLines);
return lines2.map((v) => mappedString(str2, [v.range]));
}

// parsing.ts
Expand Down Expand Up @@ -30795,6 +30795,27 @@ function createLocalizedError(obj) {
};
}

// ../is-circular.ts
var isCircular = (obj) => {
const objectSet = /* @__PURE__ */ new WeakSet();
const detect = (obj2) => {
if (obj2 && typeof obj2 === "object") {
if (objectSet.has(obj2)) {
return true;
}
objectSet.add(obj2);
for (const key in obj2) {
if (Object.hasOwn(obj2, key) && detect(obj2[key])) {
return true;
}
}
objectSet.delete(obj2);
}
return false;
};
return detect(obj);
};

// annotated-yaml.ts
function postProcessAnnotation(parse) {
if (parse.components.length === 1 && parse.start === parse.components[0].start && parse.end === parse.components[0].end) {
Expand Down Expand Up @@ -30945,16 +30966,10 @@ function buildJsYamlAnnotation(mappedYaml) {
`Expected a single result, got ${results.length} instead`
);
}
try {
JSON.stringify(results[0]);
} catch (e) {
if (e.message.match("invalid string length")) {
} else if (e.message.match(/circular structure/)) {
throw new InternalError(
`Circular structure detected in parsed yaml: ${e.message}`
);
} else {
}
if (isCircular(results[0])) {
throw new InternalError(
`Circular structure detected in yaml`
);
}
return postProcessAnnotation(results[0]);
}
Expand Down
43 changes: 29 additions & 14 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.

Original file line number Diff line number Diff line change
Expand Up @@ -9031,7 +9031,7 @@
"schema": "string",
"description": {
"short": "A regular expression that can be used to determine whether a link is an internal link.",
"long": "A regular expression that can be used to determine whether a link is an internal link. For example, \nthe following will treat links that start with http://www.quarto.org as internal links (and others\nwill be considered external):\n\n```\n^(?:http:|https:)\\/\\/www\\.quarto\\.org\\/custom\n```\n"
"long": "A regular expression that can be used to determine whether a link is an internal link. For example, \nthe following will treat links that start with `http://www.quarto.org/custom` or `https://www.quarto.org/custom`\nas internal links (and others will be considered external):\n\n```\n^(?:http:|https:)\\/\\/www\\.quarto\\.org\\/custom\n```\n"
}
},
{
Expand Down Expand Up @@ -14623,7 +14623,7 @@
"Short/abbreviated form of container-title;",
"A minor contributor to the item; typically cited using “with” before\nthe name when listed in a bibliography.",
"Curator of an exhibit or collection (e.g.&nbsp;in a museum).",
"Physical (e.g.&nbsp;size) or temporal (e.g.��running time) dimensions of\nthe item.",
"Physical (e.g.&nbsp;size) or temporal (e.g.&nbsp;running time) dimensions of\nthe item.",
"Director (e.g.&nbsp;of a film).",
"Minor subdivision of a court with a <code>jurisdiction</code> for a\nlegal item",
"(Container) edition holding the item (e.g.&nbsp;“3” when citing a chapter\nin the third edition of a book).",
Expand Down
6 changes: 3 additions & 3 deletions src/resources/formats/html/esbuild-analysis-cache.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"quarto.js": {
"inputs": {
"quarto.js": {
"bytes": 26327,
"bytes": 26396,
"imports": [],
"format": "esm"
}
Expand All @@ -20,10 +20,10 @@
"entryPoint": "quarto.js",
"inputs": {
"quarto.js": {
"bytesInOutput": 21890
"bytesInOutput": 21946
}
},
"bytes": 21890
"bytes": 21946
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/resources/schema/document-links.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
short: "A regular expression that can be used to determine whether a link is an internal link."
long: |
A regular expression that can be used to determine whether a link is an internal link. For example,
the following will treat links that start with http://www.quarto.org as internal links (and others
will be considered external):
the following will treat links that start with `http://www.quarto.org/custom` or `https://www.quarto.org/custom`
as internal links (and others will be considered external):

```
^(?:http:|https:)\/\/www\.quarto\.org\/custom
Expand Down
Loading