react-diff-viewer icon indicating copy to clipboard operation
react-diff-viewer copied to clipboard

Leading spaces are hidden

Open p-himik opened this issue 5 years ago • 2 comments

Comparing

"1\n    a"

with

"1\n    b"

results in this: image I think that's because the leading spaces are wrapped in span - without wrapping, the browser (tested in Chrome and Firefox) doesn't hide them.

p-himik avatar Oct 12 '20 09:10 p-himik

Wrapping in code instead of span seems to do the trick. Not sure if there are any implications.

p-himik avatar Oct 12 '20 09:10 p-himik

having the same issue

nirsky avatar Dec 02 '21 16:12 nirsky