Closed rjp closed 9 months ago
> fastgron -V fastgron version 0.6.5 > cat test2.json { <TAB>"RecipesUsed": { <TAB><TAB>"minecraft:glass": 1, <TAB><TAB>"minecraft:quotes": 2 <TAB>} } > fastgron --semicolon < test2.json json = {}; json.RecipesUsed = {}; json.RecipesUsed["minecraft:glass"] = 1; json.RecipesUsed["minecraft:quotes"] = 2 ; > expand test2.json | fastgron --semicolon json = {}; json.RecipesUsed = {}; json.RecipesUsed["minecraft:glass"] = 1; json.RecipesUsed["minecraft:quotes"] = 2;
Seems to be "if there's a tab between the last content and the closing brace, the last semicolon for that block gets kicked a line down".
> cat test4.json "RecipesUsed": { "minecraft:quotes": 2 <TAB>}, "moose": 42 } > fastgron --semicolon < test4.json json = {}; json.RecipesUsed = {}; json.RecipesUsed["minecraft:quotes"] = 2 ; json.moose = 42;
Thanks, I added tabs as white spaces for tokenization, it will be available when I release v0.7.5 . (I leave this issue open until it is released).
I released v0.7.5
Seems to be "if there's a tab between the last content and the closing brace, the last semicolon for that block gets kicked a line down".