rajatthareja/ReportBuilder

Double spaces and double new lines unnecessarily removed

Closed this issue · 2 comments

Why don't you remove .gsub(' ', '').gsub("\n\n", '') from line 42 in builder.rb?
When you leave those spaces and new line characters preformatted text looks much better:

Instead of this:

{
"server": "nginx",
"date": "Fri, 14 Jun 2019 12:39:36 GMT",
"content_type": "text/html;charset=utf-8",
"content_length": "3585",
"connection": "keep-alive",
"vary": "Accept-Encoding",
"cache_control": "no-store, must-revalidate, max-age=0",
"set_cookie": [
"AUTH_SESSION_ID=6717f291-98a9-46d6-aeb9-bcc80700ca47.keycloak-788d46f7bb-qtfml; Version=1; Path=/auth/realms/xxx/; HttpOnly",
],
"x_xss_protection": "1; mode=block"
}

we'd get this, much better looking, especially in complex jsons and xmls:

{
  "server": "nginx",
  "date": "Fri, 14 Jun 2019 12:39:36 GMT",
  "content_type": "text/html;charset=utf-8",
  "content_length": "3585",
  "connection": "keep-alive",
  "vary": "Accept-Encoding",
  "cache_control": "no-store, must-revalidate, max-age=0",
  "set_cookie": [
    "AUTH_SESSION_ID=6717f291-98a9-46d6-aeb9-bcc80700ca47.keycloak-788d46f7bb-qtfml; Version=1; Path=/auth/realms/dop/; HttpOnly",
  ],
  "x_xss_protection": "1; mode=block"
}

Any feedback bout it?