Skip to content

Commit

Permalink
Bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
wifi-left committed May 1, 2024
1 parent 4a5df8d commit d35dd36
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion NBTool.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function getNbtContent(nbttext) {
if (nbttext.startsWith("\"")) {
return JSON.parse(nbttext);
} else if (nbttext.startsWith("'")) {
return (nbttext.substring(1, nbttext.length - 1).replace("\\\\","\\"));
return (nbttext.substring(1, nbttext.length - 1).replaceAll("\\\\","\\"));
}
switch (nbttext[nbttext.length - 1]) {
case 's':
Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ function transformFile(input, output, overwrite = false) {
writeLine("## Datapack Upgrader v" + package.version + " by " + package.author)
writeLine("## If you encounter a problem, make an issue on " + package.homepage)
writeLine("## ")
let arrs = content.replace("\r", "").split("\n");
let arrs = content.replaceAll("\r", "").split("\n");
for (let j = 0; j < arrs.length; j++)
writeLine(transformCommand(arrs[j].trim()));
return;
Expand Down

0 comments on commit d35dd36

Please sign in to comment.