-
-
Notifications
You must be signed in to change notification settings - Fork 785
Open
Labels
Description
Support for merge keys was removed in YAML 1.2. However, this is still supported in js-yaml.
Since js-yaml aims to be YAML 1.2 compatible, it should treat << as a regular key.
Given the following script:
const yaml = require('js-yaml');
console.dir(yaml.load(`
foo: &foo
f: oo
bar:
<<: *foo
`))Expected output:
{ foo: { f: 'oo' }, bar: { '<<': { f: 'oo' } } }Actual output:
{ foo: { f: 'oo' }, bar: { f: 'oo' } }I realize many people expect this to work the way as it does now, so a fix should be considered carefully, possibly in a major version release.