[GH-ISSUE #1419] Wrap code blocks in documentation for better readability #166

Closed
opened 2026-02-17 17:19:19 -05:00 by yindo · 2 comments
Owner

Originally created by @val461 on GitHub (Oct 30, 2025).
Original GitHub issue: https://github.com/langchain-ai/docs/issues/1419

Checked other resources

  • This is a feature request, not a bug report or usage question.
  • I added a clear and descriptive title that summarizes the feature request.
  • I used the GitHub search to find a similar feature request and didn't find it.
  • I checked the LangChain documentation and API reference to see if this feature already exists.
  • This is not related to the langchain-community package.

Feature Description

Enable line wrapping for code blocks to improve usability on all screen sizes.

Use Case

Code examples in the documentation are not wrapped, forcing users to scroll horizontally back and forth — which is inconvenient and disrupts reading flow. Additionally, the "Copy" and "Ask AI" buttons often overlap with the code, even after scrolling.

This is made more frustrating by the presence of vast unused horizontal space near the edges of the screen (see screenshot below).

Proposed Solution

CSS white-space: pre-wrap or similar.

Alternatives Considered

No response

Additional Context

Example and screenshot:

https://docs.langchain.com/oss/python/langgraph/thinking-in-langgraph#implementing-our-email-agent-nodes


Image
Originally created by @val461 on GitHub (Oct 30, 2025). Original GitHub issue: https://github.com/langchain-ai/docs/issues/1419 ### Checked other resources - [x] This is a feature request, not a bug report or usage question. - [x] I added a clear and descriptive title that summarizes the feature request. - [x] I used the GitHub search to find a similar feature request and didn't find it. - [x] I checked the LangChain documentation and API reference to see if this feature already exists. - [x] This is not related to the langchain-community package. ### Feature Description Enable line wrapping for code blocks to improve usability on all screen sizes. ### Use Case Code examples in the documentation are not wrapped, forcing users to scroll horizontally back and forth — which is inconvenient and disrupts reading flow. Additionally, the "Copy" and "Ask AI" buttons often overlap with the code, even after scrolling. This is made more frustrating by the presence of vast unused horizontal space near the edges of the screen (see screenshot below). ### Proposed Solution CSS white-space: pre-wrap or similar. ### Alternatives Considered _No response_ ### Additional Context Example and screenshot: https://docs.langchain.com/oss/python/langgraph/thinking-in-langgraph#implementing-our-email-agent-nodes --- <img width="1903" height="194" alt="Image" src="https://github.com/user-attachments/assets/6f041e0a-8211-4d50-9798-0443b6a9a851" />
yindo added the external label 2026-02-17 17:19:19 -05:00
yindo closed this issue 2026-02-17 17:19:19 -05:00
Author
Owner

@Nomzy-kush commented on GitHub (Nov 12, 2025):

I’ve submitted a PR to langchain-ai/langchain-docs implementing the proposed code wrapping fix.
The update improves readability across devices and prevents overlap with utility buttons.
link to PR

@Nomzy-kush commented on GitHub (Nov 12, 2025): I’ve submitted a PR to langchain-ai/langchain-docs implementing the proposed code wrapping fix. The update improves readability across devices and prevents overlap with utility buttons. [link to PR](https://github.com/langchain-ai/docs/pull/1395)
Author
Owner

@val461 commented on GitHub (Nov 13, 2025):

Thank you! Feel free to close the issue when appropriate.

@val461 commented on GitHub (Nov 13, 2025): Thank you! Feel free to close the issue when appropriate.
yindo changed title from Wrap code blocks in documentation for better readability to [GH-ISSUE #1419] Wrap code blocks in documentation for better readability 2026-06-05 17:25:25 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/docs#166