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

[EuiCodeBlock] enabling lineNumbers causes copied text to contain actual line numbers #6818

Closed
tkajtoch opened this issue May 30, 2023 · 0 comments · Fixed by #6824
Closed
Assignees
Labels

Comments

@tkajtoch
Copy link
Member

Describe the bug

When lineNumbers = true and isCopyable = true the copied text contains code block content as well as line numbers.

This bug references elastic/kibana#158644.

Environment and versions

  • EUI version: v81.0.0
  • Browser: all (tested on Chrome, Safari and Firefox)
  • Operating System: all (tested on MacOS)

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://eui.elastic.co/#/editors-syntax/code#code-block
  2. Click on Playground
  3. Enable lineNumbers and isCopyable
  4. Click the copy icon
  5. See that the copied text contains line numbers

Expected behavior

The copied text should not contain line numbers.

Minimum reproducible sandbox

https://codesandbox.io/s/young-fast-rh60ds?file=/demo.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants