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

🔧 Fix: Excessive Line Spacing in Markdown-rendered User Messages #4718

Conversation

ohneda
Copy link
Contributor

@ohneda ohneda commented Nov 13, 2024

Summary

This PR addresses an issue where excessive line spacing was added when rendering user messages in Markdown format, resulting in an unintended appearance.

Before:

image

After fix:

User message rendered in markdown

image

User message rendered as plain text

image

Details

Currently, Markdown-rendered user messages have a whitespace-pre-wrap class applied to their wrapper div. This class introduces extra line spacing in markdown text.

This fix removes the whitespace-pre-wrap class from the wrapper div for markdown-rendered user messages, ensuring the line spacing is consistent and appropriate.

Please let me know if this solution isn't suitable.

Change Type

  • Bug fix (non-breaking change which fixes an issue)

Testing

I have manually verified the following:

  • Markdown-rendered user messages display with correct line spacing
  • Markdown formatting functions properly
  • Non-markdown user messages maintain appropriate line breaks

Checklist

  • My code adheres to this project's style guidelines
  • I have performed a self-review of my own code
  • My changes do not introduce new warnings
  • Local unit tests pass with my changes

@insilications
Copy link

Yes, I can confirm that this is a real problem right now.

@danny-avila danny-avila merged commit b5232af into danny-avila:main Nov 16, 2024
2 checks passed
@ohneda ohneda deleted the fix/excessive-line-spacing-in-user-messages branch November 16, 2024 18:06
rickardp pushed a commit to rickardp/LibreChat that referenced this pull request Nov 17, 2024
…ny-avila#4718)

* fix: Excessive Line Spacing in User-Created Messages

* fix: Add whitespace-pre-wrap if user message is not markdown
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