Comparing version 1.0.2 to 1.0.3
@@ -131,4 +131,11 @@ "use strict"; | ||
const end = folds[i + 1] || text.length; | ||
if (mode === FOLD_QUOTED && escapedFolds[fold]) res += `${text[fold]}\\`; | ||
res += `\n${indent}${text.slice(fold + 1, end)}`; | ||
if (mode === FOLD_QUOTED && escapedFolds[fold]) { | ||
const ch = text[fold]; | ||
res += ch === '\\' ? `\\\n${indent}${ch}` : `${ch}\\\n${indent}`; | ||
} else { | ||
res += `\n${indent}`; | ||
} | ||
res += text.slice(fold + 1, end); | ||
} | ||
@@ -135,0 +142,0 @@ |
@@ -248,5 +248,5 @@ "use strict"; | ||
if (!value || /^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(value)) { | ||
if (!value || /^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(value)) { | ||
// not allowed: | ||
// - empty string | ||
// - empty string, '-' or '?' | ||
// - start with an indicator character (except [?:-]) or /[?-] / | ||
@@ -253,0 +253,0 @@ // - '\n ', ': ' or ' \n' anywhere |
{ | ||
"name": "yaml", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"main": "dist/index.js", | ||
@@ -5,0 +5,0 @@ "license": "ISC", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
166315
4451