danny-avila / LibreChat

Enhanced ChatGPT Clone: Features Anthropic, AWS, OpenAI, Assistants API, Azure, Groq, o1, GPT-4o, Mistral, OpenRouter, Vertex AI, Gemini, Artifacts, AI model switching, message search, langchain, DALL-E-3, ChatGPT Plugins, OpenAI Functions, Secure Multi-User System, Presets, completely open-source for self-hosting. Actively in public development.
https://librechat.ai/
MIT License
19.4k stars 3.24k forks source link

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

Closed ohneda closed 1 week ago

ohneda commented 2 weeks ago

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

Testing

I have manually verified the following:

Checklist

insilications commented 1 week ago

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