In search, extra whitespaces should be removed when "Show more context" is on

Use case or problem

When searching and results are in formatted tables, it would be nice to show the most context possible.

Proposed solution

It would be nice to “compress” the characters by removing whitespaces and extra lines.

  • multiple sequential whitespaces -> one white space
  • multiple sequential newlines -> one new line