Skip to content

Preserve whitespaces on detail log webview #3413

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

Conversation

wanglin86769
Copy link
Contributor

For PSI Elog, if log is submitted as plain text and retrieved using Phoebus client, whitespaces and newlines in description will be collapsed as single whitespace.

For example,
333 | 444 | 555
ccd | ddd | eee

will be displayed as,
333 | 444 | 555 ccd | ddd | eee

This PR adds one line CSS style in order to preserve the whitespaces.

@georgweiss
Copy link
Collaborator

I'm afraid this change has a side effect.
Olog uses Markdown for the log entry body. Trailing white space in Markdown is treated as described here: https://commonmark.org/help/tutorial/03-paragraphs.html.
So if a line ends in a single white space, the content that follows is put on same line as in the example provided in this issue ticket. While the proposed change would in a sense make it easier for users (no need to use two space chars to break line),
existing entries would be affected.
There is also the web browser client for Olog to consider, which would need to adopt the same change.

@shroffk, what is your take on this?

@wanglin86769
Copy link
Contributor Author

Thanks for the comment. If this PR is not appropriate, probably there is another potential solution as shown in PR #3414 .

@shroffk
Copy link
Member

shroffk commented May 23, 2025

Thanks, I think the wrapping the elog text is better. I think we should continue to stick with the commonmark specification so that we will be able to use third party libraries and solutions.

@shroffk
Copy link
Member

shroffk commented May 23, 2025

I wonder if we should look into a way to allow site specific css contributions

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

Successfully merging this pull request may close these issues.

3 participants