Skip to content

Commit a72299b

Browse files
committed
build js
1 parent 8bdaf6b commit a72299b

File tree

3 files changed

+19
-17
lines changed

3 files changed

+19
-17
lines changed

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

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17992,7 +17992,7 @@ var require_yaml_intelligence_resources = __commonJS({
1799217992
"Sets the date metadata for the document",
1799317993
{
1799417994
short: "Number section headings",
17995-
long: "Number section headings rendered ouptut. By default, sections are not\nnumbered. Sections with class <code>.unnumbered</code> will never be\nnumbered, even if <code>number-sections</code> is specified."
17995+
long: "Number section headings rendered output. By default, sections are not\nnumbered. Sections with class <code>.unnumbered</code> will never be\nnumbered, even if <code>number-sections</code> is specified."
1799617996
},
1799717997
{
1799817998
short: "The depth to which sections should be numbered.",
@@ -27080,24 +27080,25 @@ async function parseAndValidateCellOptions(mappedYaml, language, validate2 = fal
2708027080
}
2708127081
function partitionCellOptionsText(language, source) {
2708227082
const commentChars = langCommentChars(language);
27083-
const optionPrefix = optionCommentPrefix(commentChars[0]);
27083+
const optionPattern = optionCommentPattern(commentChars[0]);
2708427084
const optionSuffix = commentChars[1] || "";
2708527085
const optionsSource = [];
2708627086
const yamlLines = [];
2708727087
let endOfYaml = 0;
2708827088
for (const line of rangedLines(source.value, true)) {
27089-
if (line.substring.startsWith(optionPrefix)) {
27089+
const optionMatch = line.substring.match(optionPattern);
27090+
if (optionMatch) {
2709027091
if (!optionSuffix || line.substring.trimRight().endsWith(optionSuffix)) {
27091-
let yamlOption = line.substring.substring(optionPrefix.length);
27092+
let yamlOption = line.substring.substring(optionMatch[0].length);
2709227093
if (optionSuffix) {
2709327094
yamlOption = yamlOption.trimRight();
2709427095
yamlOption = yamlOption.substring(0, yamlOption.length - optionSuffix.length);
2709527096
}
27096-
endOfYaml = line.range.start + optionPrefix.length + yamlOption.length - optionSuffix.length;
27097+
endOfYaml = line.range.start + optionMatch[0].length + yamlOption.length - optionSuffix.length;
2709727098
const rangedYamlOption = {
2709827099
substring: yamlOption,
2709927100
range: {
27100-
start: line.range.start + optionPrefix.length,
27101+
start: line.range.start + optionMatch[0].length,
2710127102
end: endOfYaml
2710227103
}
2710327104
};
@@ -27151,8 +27152,8 @@ function langCommentChars(lang) {
2715127152
return chars;
2715227153
}
2715327154
}
27154-
function optionCommentPrefix(comment) {
27155-
return comment + "| ";
27155+
function optionCommentPattern(comment) {
27156+
return new RegExp("^" + comment + "\\s*\\| ");
2715627157
}
2715727158
var kLangCommentChars = {
2715827159
r: "#",

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

Lines changed: 9 additions & 8 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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10968,7 +10968,7 @@
1096810968
"Sets the date metadata for the document",
1096910969
{
1097010970
"short": "Number section headings",
10971-
"long": "Number section headings rendered ouptut. By default, sections are not\nnumbered. Sections with class <code>.unnumbered</code> will never be\nnumbered, even if <code>number-sections</code> is specified."
10971+
"long": "Number section headings rendered output. By default, sections are not\nnumbered. Sections with class <code>.unnumbered</code> will never be\nnumbered, even if <code>number-sections</code> is specified."
1097210972
},
1097310973
{
1097410974
"short": "The depth to which sections should be numbered.",

0 commit comments

Comments
 (0)