Crauzer / Obsidian

Wad archive editor for League of Legends
GNU General Public License v3.0
574 stars 100 forks source link

Auto prettify `.json` chunk preview text #249

Open Mrgaton opened 5 months ago

Mrgaton commented 5 months ago

image

Since the project is made in TypeScript, it would not be difficult to automatically auto-pretify the json files.

Crauzer commented 5 months ago

The screenshot you posted is of Obsidian v5 which is written in C#. At the time of development there was no prettifying library in C# for doing this.

However, it might be possible to implement this using something like prettier in v6

Mrgaton commented 5 months ago

it's not necessary to use prettier i think you can just do

JSON.stringify(JSON.parse(data.toString('utf-8')), null, 2)