Added missing changes and modified dist assets.
This commit is contained in:
parent
fef429767f
commit
c7cf40cfaf
35
dist/index.js
generated
vendored
35
dist/index.js
generated
vendored
@ -68647,7 +68647,7 @@ const jsonScalars = [
|
|||||||
identify: value => typeof value === 'boolean',
|
identify: value => typeof value === 'boolean',
|
||||||
default: true,
|
default: true,
|
||||||
tag: 'tag:yaml.org,2002:bool',
|
tag: 'tag:yaml.org,2002:bool',
|
||||||
test: /^true|false$/,
|
test: /^true$|^false$/,
|
||||||
resolve: str => str === 'true',
|
resolve: str => str === 'true',
|
||||||
stringify: stringifyJSON
|
stringify: stringifyJSON
|
||||||
},
|
},
|
||||||
@ -69553,7 +69553,7 @@ const timestamp = {
|
|||||||
}
|
}
|
||||||
return new Date(date);
|
return new Date(date);
|
||||||
},
|
},
|
||||||
stringify: ({ value }) => value.toISOString().replace(/((T00:00)?:00)?\.000Z$/, '')
|
stringify: ({ value }) => value.toISOString().replace(/(T00:00:00)?\.000Z$/, '')
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.floatTime = floatTime;
|
exports.floatTime = floatTime;
|
||||||
@ -70563,23 +70563,32 @@ function blockString({ comment, type, value }, ctx, onComment, onChompKeep) {
|
|||||||
start = start.replace(/\n+/g, `$&${indent}`);
|
start = start.replace(/\n+/g, `$&${indent}`);
|
||||||
}
|
}
|
||||||
const indentSize = indent ? '2' : '1'; // root is at -1
|
const indentSize = indent ? '2' : '1'; // root is at -1
|
||||||
let header = (literal ? '|' : '>') + (startWithSpace ? indentSize : '') + chomp;
|
// Leading | or > is added later
|
||||||
|
let header = (startWithSpace ? indentSize : '') + chomp;
|
||||||
if (comment) {
|
if (comment) {
|
||||||
header += ' ' + commentString(comment.replace(/ ?[\r\n]+/g, ' '));
|
header += ' ' + commentString(comment.replace(/ ?[\r\n]+/g, ' '));
|
||||||
if (onComment)
|
if (onComment)
|
||||||
onComment();
|
onComment();
|
||||||
}
|
}
|
||||||
if (literal) {
|
if (!literal) {
|
||||||
value = value.replace(/\n+/g, `$&${indent}`);
|
const foldedValue = value
|
||||||
return `${header}\n${indent}${start}${value}${end}`;
|
.replace(/\n+/g, '\n$&')
|
||||||
|
.replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g, '$1$2') // more-indented lines aren't folded
|
||||||
|
// ^ more-ind. ^ empty ^ capture next empty lines only at end of indent
|
||||||
|
.replace(/\n+/g, `$&${indent}`);
|
||||||
|
let literalFallback = false;
|
||||||
|
const foldOptions = getFoldOptions(ctx, true);
|
||||||
|
if (blockQuote !== 'folded' && type !== Scalar.Scalar.BLOCK_FOLDED) {
|
||||||
|
foldOptions.onOverflow = () => {
|
||||||
|
literalFallback = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
const body = foldFlowLines.foldFlowLines(`${start}${foldedValue}${end}`, indent, foldFlowLines.FOLD_BLOCK, foldOptions);
|
||||||
|
if (!literalFallback)
|
||||||
|
return `>${header}\n${indent}${body}`;
|
||||||
}
|
}
|
||||||
value = value
|
value = value.replace(/\n+/g, `$&${indent}`);
|
||||||
.replace(/\n+/g, '\n$&')
|
return `|${header}\n${indent}${start}${value}${end}`;
|
||||||
.replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g, '$1$2') // more-indented lines aren't folded
|
|
||||||
// ^ more-ind. ^ empty ^ capture next empty lines only at end of indent
|
|
||||||
.replace(/\n+/g, `$&${indent}`);
|
|
||||||
const body = foldFlowLines.foldFlowLines(`${start}${value}${end}`, indent, foldFlowLines.FOLD_BLOCK, getFoldOptions(ctx, true));
|
|
||||||
return `${header}\n${indent}${body}`;
|
|
||||||
}
|
}
|
||||||
function plainString(item, ctx, onComment, onChompKeep) {
|
function plainString(item, ctx, onComment, onChompKeep) {
|
||||||
const { type, value } = item;
|
const { type, value } = item;
|
||||||
|
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…
x
Reference in New Issue
Block a user