mirror of
https://github.com/tj-actions/changed-files
synced 2025-03-07 09:27:23 +00:00
Added missing changes and modified dist assets.
This commit is contained in:
parent
2c97e7ea24
commit
d516645658
2 changed files with 29 additions and 24 deletions
51
dist/index.js
generated
vendored
51
dist/index.js
generated
vendored
|
@ -62141,7 +62141,10 @@ class Parser {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (this.indent >= map.indent) {
|
if (this.indent >= map.indent) {
|
||||||
const atNextItem = !this.onKeyLine && this.indent === map.indent && it.sep;
|
const atNextItem = !this.onKeyLine &&
|
||||||
|
this.indent === map.indent &&
|
||||||
|
it.sep &&
|
||||||
|
this.type !== 'seq-item-ind';
|
||||||
// For empty nodes, assign newline-separated not indented empty tokens to following node
|
// For empty nodes, assign newline-separated not indented empty tokens to following node
|
||||||
let start = [];
|
let start = [];
|
||||||
if (atNextItem && it.sep && !it.value) {
|
if (atNextItem && it.sep && !it.value) {
|
||||||
|
@ -63906,7 +63909,7 @@ function foldFlowLines(text, indent, mode = 'flow', { indentAtStart, lineWidth =
|
||||||
let escStart = -1;
|
let escStart = -1;
|
||||||
let escEnd = -1;
|
let escEnd = -1;
|
||||||
if (mode === FOLD_BLOCK) {
|
if (mode === FOLD_BLOCK) {
|
||||||
i = consumeMoreIndentedLines(text, i);
|
i = consumeMoreIndentedLines(text, i, indent.length);
|
||||||
if (i !== -1)
|
if (i !== -1)
|
||||||
end = i + endStep;
|
end = i + endStep;
|
||||||
}
|
}
|
||||||
|
@ -63930,8 +63933,8 @@ function foldFlowLines(text, indent, mode = 'flow', { indentAtStart, lineWidth =
|
||||||
}
|
}
|
||||||
if (ch === '\n') {
|
if (ch === '\n') {
|
||||||
if (mode === FOLD_BLOCK)
|
if (mode === FOLD_BLOCK)
|
||||||
i = consumeMoreIndentedLines(text, i);
|
i = consumeMoreIndentedLines(text, i, indent.length);
|
||||||
end = i + endStep;
|
end = i + indent.length + endStep;
|
||||||
split = undefined;
|
split = undefined;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -63999,15 +64002,24 @@ function foldFlowLines(text, indent, mode = 'flow', { indentAtStart, lineWidth =
|
||||||
* Presumes `i + 1` is at the start of a line
|
* Presumes `i + 1` is at the start of a line
|
||||||
* @returns index of last newline in more-indented block
|
* @returns index of last newline in more-indented block
|
||||||
*/
|
*/
|
||||||
function consumeMoreIndentedLines(text, i) {
|
function consumeMoreIndentedLines(text, i, indent) {
|
||||||
let ch = text[i + 1];
|
let end = i;
|
||||||
|
let start = i + 1;
|
||||||
|
let ch = text[start];
|
||||||
while (ch === ' ' || ch === '\t') {
|
while (ch === ' ' || ch === '\t') {
|
||||||
do {
|
if (i < start + indent) {
|
||||||
ch = text[(i += 1)];
|
ch = text[++i];
|
||||||
} while (ch && ch !== '\n');
|
|
||||||
ch = text[i + 1];
|
|
||||||
}
|
}
|
||||||
return i;
|
else {
|
||||||
|
do {
|
||||||
|
ch = text[++i];
|
||||||
|
} while (ch && ch !== '\n');
|
||||||
|
end = i;
|
||||||
|
start = i + 1;
|
||||||
|
ch = text[start];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return end;
|
||||||
}
|
}
|
||||||
|
|
||||||
exports.FOLD_BLOCK = FOLD_BLOCK;
|
exports.FOLD_BLOCK = FOLD_BLOCK;
|
||||||
|
@ -64219,7 +64231,7 @@ function stringifyBlockCollection({ comment, items }, ctx, { blockItemPrefix, fl
|
||||||
onChompKeep();
|
onChompKeep();
|
||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
function stringifyFlowCollection({ comment, items }, ctx, { flowChars, itemIndent, onComment }) {
|
function stringifyFlowCollection({ items }, ctx, { flowChars, itemIndent }) {
|
||||||
const { indent, indentStep, flowCollectionPadding: fcPadding, options: { commentString } } = ctx;
|
const { indent, indentStep, flowCollectionPadding: fcPadding, options: { commentString } } = ctx;
|
||||||
itemIndent += indentStep;
|
itemIndent += indentStep;
|
||||||
const itemCtx = Object.assign({}, ctx, {
|
const itemCtx = Object.assign({}, ctx, {
|
||||||
|
@ -64272,10 +64284,9 @@ function stringifyFlowCollection({ comment, items }, ctx, { flowChars, itemInden
|
||||||
lines.push(str);
|
lines.push(str);
|
||||||
linesAtValue = lines.length;
|
linesAtValue = lines.length;
|
||||||
}
|
}
|
||||||
let str;
|
|
||||||
const { start, end } = flowChars;
|
const { start, end } = flowChars;
|
||||||
if (lines.length === 0) {
|
if (lines.length === 0) {
|
||||||
str = start + end;
|
return start + end;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (!reqNewline) {
|
if (!reqNewline) {
|
||||||
|
@ -64283,21 +64294,15 @@ function stringifyFlowCollection({ comment, items }, ctx, { flowChars, itemInden
|
||||||
reqNewline = ctx.options.lineWidth > 0 && len > ctx.options.lineWidth;
|
reqNewline = ctx.options.lineWidth > 0 && len > ctx.options.lineWidth;
|
||||||
}
|
}
|
||||||
if (reqNewline) {
|
if (reqNewline) {
|
||||||
str = start;
|
let str = start;
|
||||||
for (const line of lines)
|
for (const line of lines)
|
||||||
str += line ? `\n${indentStep}${indent}${line}` : '\n';
|
str += line ? `\n${indentStep}${indent}${line}` : '\n';
|
||||||
str += `\n${indent}${end}`;
|
return `${str}\n${indent}${end}`;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
str = `${start}${fcPadding}${lines.join(' ')}${fcPadding}${end}`;
|
return `${start}${fcPadding}${lines.join(' ')}${fcPadding}${end}`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (comment) {
|
|
||||||
str += stringifyComment.lineComment(str, indent, commentString(comment));
|
|
||||||
if (onComment)
|
|
||||||
onComment();
|
|
||||||
}
|
|
||||||
return str;
|
|
||||||
}
|
}
|
||||||
function addCommentBefore({ indent, options: { commentString } }, lines, comment, chompKeep) {
|
function addCommentBefore({ indent, options: { commentString } }, lines, comment, chompKeep) {
|
||||||
if (comment && chompKeep)
|
if (comment && chompKeep)
|
||||||
|
|
2
dist/index.js.map
generated
vendored
2
dist/index.js.map
generated
vendored
File diff suppressed because one or more lines are too long
Loading…
Add table
Reference in a new issue