Open raul1991 opened 4 years ago
I agree this would be great. It is straight forward to update json.dumps
to specify add indentation and sorting. Here's an example from Stack Overflow. I would suggest an indentation of two would be appropriate here.
However this means that some will now run over multiple lines and so all the templates will need updating to support this.
https://github.com/rapidsai/frigate/blob/d138d180c702165c1fd63b5a49ec90359d14282e/frigate/templates/html.jinja2#L47 https://github.com/rapidsai/frigate/blob/d138d180c702165c1fd63b5a49ec90359d14282e/frigate/templates/markdown.jinja2#L22 https://github.com/rapidsai/frigate/blob/d138d180c702165c1fd63b5a49ec90359d14282e/frigate/templates/rst.jinja2#L30
Just for my understanding ...
The {{default}} will be a multi line json so each block of it lying on separate line needs to back-ticked so as to form a correctly formatted json ?
Like this ?
or probably using html code to create table like this
Changed the code a bit and it looks beautiful with 4 indents, will push the code soon.
Awesome I look forward to reviewing the PR!
It would be nice to have the json formatted properly inside a table cell rather a single huge line of json.