Skip to content

Commit

Permalink
🐛 Allow single quotes in NBT paths (#1150)
Browse files Browse the repository at this point in the history
  • Loading branch information
SPGoding committed May 17, 2024
1 parent ad778e3 commit b626aff
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
11 changes: 1 addition & 10 deletions __snapshots__/packages/nbt/test-out/parser/path.spec.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions packages/nbt/src/parser/path.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit b626aff

Please sign in to comment.