Skip to content

<pre> blocks render incorrectly in non-English localized docs pages #43232

@HitoshiroKyoka

Description

@HitoshiroKyoka

Code of Conduct

What article on docs.github.com is affected?

This appears to affect localized pages on docs.github.com when the documentation language is set to a non-English locale.

On pages that contain content rendered inside <pre> blocks, the layout breaks in non-English languages. The content inside those blocks becomes visually corrupted (for example, overflowing horizontally, collapsing, or becoming difficult to read).

I reproduced this on multiple localized pages. Please see the attached screenshots.

https://docs.github.com/ja/code-security/how-tos/secure-your-secrets/detect-secret-leaks/enabling-secret-scanning-for-your-repository
Image

https://docs.github.com/es/code-security/how-tos/secure-your-secrets/detect-secret-leaks/enabling-secret-scanning-for-your-repository
Image

Steps to reproduce

  1. Open a docs.github.com article that contains content displayed inside <pre> blocks.
  2. Change the documentation language to a non-English locale (for example, Japanese or Spanish).
  3. Scroll to a section that contains one of those <pre>-styled content blocks.
  4. Observe that the layout of the block is broken.

What changes are you suggesting?

<pre> blocks should remain readable and properly formatted regardless of the selected documentation language.

Additional information

I have confirmed this on Windows versions of Edge and Chrome, and on the Android version of Chrome.

Metadata

Metadata

Assignees

No one assigned

    Labels

    contentThis issue or pull request belongs to the Docs Content teamtriageDo not begin working on this issue until triaged by the team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions