Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

\n (lines returns) are not displayed #138

Open
BenjD90 opened this issue Feb 8, 2023 · 5 comments
Open

\n (lines returns) are not displayed #138

BenjD90 opened this issue Feb 8, 2023 · 5 comments

Comments

@BenjD90
Copy link

BenjD90 commented Feb 8, 2023

Hello,

Thanks for this component, very useful !
On our usage, we have found out that the \n are not displayed, for example we have this behavior :

image

When we expect to see that :

image

In Chrome DevTools, we can see the \n characters :
image

What do you think about this change ?

Thanks in advance for your response,
Benjamin

@wlievens
Copy link

I ran into this as well, I would just like to see a \n in the component.

@BenjD90
Copy link
Author

BenjD90 commented May 26, 2023

@wlievens The \n is visible :

image

@wlievens
Copy link

Any idea what I'm doing wrong then?

See the two blue boxes: left is my ngx-json-viewer component, right is the JSON payload I'm rendering.

image

I'm using:
"ngx-json-viewer": "^3.2.1",

Template code:
<ngx-json-viewer [depth]="1" [expanded]="true" [json]="job.task.arguments"></ngx-json-viewer>

@wlievens
Copy link

Maybe I am misunderstanding, and this functionality is not yet in the latest release? Sorry if that's the case, I can be patient :-)

@AkoNis
Copy link

AkoNis commented Jun 28, 2023

late to the party but what if you add white-space: break-spaces; in .segment-main class like so

.segment-main { word-wrap: break-word; white-space: break-spaces; font-size: 12px; ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants