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

fix: prevent line numbers from being copied. Closes #884 #886

Closed

Conversation

megasanjay
Copy link

There is currently an issue where having line numbers enabled in your markdown causes the copy to clipboard button to also add in those line numbers at the end.

This PR now looks at the <code> tag to read the innertext contents. This skips the line numbers from being added to the copied text.

Tested locally with lineNumbers both enabled and disabled.

@megasanjay megasanjay changed the title fix: prevent line numbers from being copied. #884 fix: prevent line numbers from being copied. Fix issue #884 Jul 1, 2022
@megasanjay megasanjay changed the title fix: prevent line numbers from being copied. Fix issue #884 fix: prevent line numbers from being copied. Closes #884 Jul 1, 2022
@brc-dd
Copy link
Member

brc-dd commented Jul 1, 2022

Hi! Thanks for the PR. But I had changed the code copying logic in #875. It appears to be fixed there.

@brc-dd brc-dd closed this Jul 1, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants