Skip to content

Wrap code blocks in documentation for better readabilityΒ #1419

@val461

Description

@val461

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions