Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] CodeBlocks cannot disable line numbering #9010

Open
qris opened this issue Sep 23, 2024 · 0 comments
Open

[Feature Request] CodeBlocks cannot disable line numbering #9010

qris opened this issue Sep 23, 2024 · 0 comments
Labels

Comments

@qris
Copy link

qris commented Sep 23, 2024

Problem Statement

The line numbering in a CodeBlock is part of the selectable text, so if you copy and paste the code block, the line numbers come too. This is quite unhelpful for actually runnable code. Ideally it would both be possible to disable the line numbers, and when present they would not be copied and pasted along with the code.

For example:

image

Copies and pastes as:

9
-----------------------------
10
Total (no discount):   £32.86
11
Reduction:             £4.99
12
=============================
13
Total (with discount): £27.87
14
=============================

Proposed solution

Add a CodeBlock parameter to disable line numbering. When it's enabled, it should be non-selectable text. GitHub achieves this for line numbers, and there's a (different) pure CSS example here, and inline here.

Alternatives or Workarounds

Not using CodeBlocks, but I can't find an alternative that offers real monospaced preformatted text in Teams/AdaptiveCard.

@qris qris added the Request label Sep 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant