Last active
September 29, 2020 06:26
-
-
Save Guillergood/803db79c4502c5624d0df87933b4de39 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"regreplace.commands": [ | |
{ | |
"name": "JSON cleaner", | |
"match": "\\.json?$", | |
"regexp": "((,)*(\n)*( )*?(\t)*?)\".*?\"( )*: (\\[( )*\\]|\\{( )*\\})|(((\n)*( )*?(\t)*?)\".*?\"( )*: (\\[( )*\\]|\\{( )*\\})(,)*(\n)*)", | |
"global": true, | |
"replace": "" | |
}, | |
{ | |
"name": "Empty properties", | |
"match": "\\.json?$", | |
"regexp": "\"(?![\t ]*(title|replace|namespace)).*\"( )*: (\"( )*\")(,)*(\n)*", | |
"global": true, | |
"replace": "" | |
}, | |
{ | |
"name": "Edge cases", | |
"match": "\\.json?$", | |
"regexp": "(\\{()*,)|(,(\t )*)}", | |
"global": true, | |
"replace": "{" | |
}, | |
{ | |
"name": "Edge cases 2", | |
"match": "\\.json?$", | |
"regexp": ",[ \t\n]+\\}", | |
"global": true, | |
"replace": "\n}" | |
} | |
], |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment