diff --git a/__snapshots__/packages/nbt/test-out/parser/path.spec.js b/__snapshots__/packages/nbt/test-out/parser/path.spec.js index da22f937c..88e97dbb6 100644 --- a/__snapshots__/packages/nbt/test-out/parser/path.spec.js +++ b/__snapshots__/packages/nbt/test-out/parser/path.spec.js @@ -82,16 +82,7 @@ exports['nbt path() Parse "\'foo\'" 1'] = { "end": 5 } }, - "errors": [ - { - "range": { - "start": 0, - "end": 0 - }, - "message": "Only “\"” can be used to quote strings here", - "severity": 3 - } - ] + "errors": [] } exports['nbt path() Parse "[ ]" 1'] = { diff --git a/packages/nbt/src/parser/path.ts b/packages/nbt/src/parser/path.ts index 3e112068d..c0db21d48 100644 --- a/packages/nbt/src/parser/path.ts +++ b/packages/nbt/src/parser/path.ts @@ -87,8 +87,9 @@ const key: PartParser = (children, src, ctx) => { const node = core.string({ colorTokenType: 'property', escapable: {}, - // No single quotes: https://bugs.mojang.com/browse/MC-175504 - quotes: ['"'], + // Single quotes supported since 1.20 Pre-release 2 (roughly pack format 15) + // https://bugs.mojang.com/browse/MC-175504 + quotes: ['"', "'"], unquotable: { blockList: new Set([ '\n',