Displaying spaces in data tables in Modern UI

I feel that the html-based table view in Modern UI need to have an alternative mechanism for displaying the data in a table, rather than simply the “html interpretation” of the data.

This became apparent to me this morning when assisting with this question on the forum, concerning removing “first space” found in data:

I had to revert to using the legacy data view in order to satisfactorily review the spaces in the data. Leading spaces are stripped when rendered by the Modern UI tables, and multiple spaces appear only as a single space, which made inspecting/analysing the data difficult in this case.

It would be useful if there were a method of rendering spaces to non-breaking spaces (using a fixed-width font), and/or a method of rendering “white space” such as spaces/tabs etc, as can be done with some editors (and word processors) where perhaps individual spaces and other characters are rendered as dots or some other symbol.