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

Copy to clipboard includes code line numbers #393

Open
jaimehrubiks opened this issue Mar 12, 2024 · 0 comments
Open

Copy to clipboard includes code line numbers #393

jaimehrubiks opened this issue Mar 12, 2024 · 0 comments

Comments

@jaimehrubiks
Copy link

Describe the bug

By default, or when using :no-line-numbers="false", the plugin will show line numbers on the left side, whenever you are using a code block

To Reproduce

<q-markdown show-copy :no-line-numbers="false">
```javascript
{{JSON.stringify(JSON.parse('{"name":"John", "age":30, "car":null}'), null, 2)}}
```
</q-markdown>

Expected behavior

Copy button should copy the content I set using the slot, or using the "src" component. Line numbers should be part of the style and shout not be copied.

Suggested Solution

Option A) Do not copy numbers

Option B) Create an event @on-copy that will return the actual content to be copied. This would solve many other similar issues.

Desktop (please complete the following information):

  • OS: Linux
  • Browser: Chrome
  • Version: Latest
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant