Skip to content

Do not include line numbers when copying code examples #150339

@vhyijk

Description

@vhyijk

Unexpected behavior

  1. Enable the "Show line numbers on code examples" option:

    Image
  2. Copy the code by clicking "copy code to clipboard" in the upper right corner of a code example:

    Image
  3. Paste the code somewhere, and you'll see redundant line numbers in the code:

    Image

Expected behavior

Regardless of whether the "Show line numbers on code examples" option is enabled, do not include line numbers when copying code examples!

Metadata

Metadata

Labels

A-frontendArea: Compiler frontend (errors, parsing and HIR)T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions