litejs / json-lite

Fast non-blocking JSON viewer for Chrome and Firefox
195 stars 16 forks source link

Copy and paste does not preserve the original indentation #53

Closed PaulNovodonSWM closed 3 years ago

PaulNovodonSWM commented 4 years ago

Observed in Firefox 77.

Reproduce steps:

  1. Copy a selection of a formatted JSON (make sure it contains indentation for the enclosed children objects)
  2. Go to a text editor (any would do; mine were BBEdit on Mac and Notepad++ on Win)
  3. Paste the selection
  4. Observe that the indentation is lost and all lines start from the beginning (see attached images)

Original JSON selection:

Screen Shot 2020-07-07 at 15 08 19

Pasted selection:

Screen Shot 2020-07-07 at 15 09 14
lauriro commented 4 years ago

Replacing css based indentation with text based indentation has been in todo list for some years.

15