Skip to content

Commit

Permalink
fix: langcfg files with trailing commas after ] create null elements
Browse files Browse the repository at this point in the history
  • Loading branch information
sebthom committed Jan 26, 2024
1 parent 5f12bc3 commit a5896c6
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ private static String removeTrailingCommas(String jsonString) {
* }
* --------------
*/
return jsonString.replaceAll("(,)(\\s*\\n(\\s*\\/\\/.*\\n)*\\s*})", "$2");
return jsonString.replaceAll("(,)(\\s*\\n(\\s*\\/\\/.*\\n)*\\s*[\\]}])", "$2");
}

/**
Expand Down

0 comments on commit a5896c6

Please sign in to comment.