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

Improved code copy behaviour #82

Conversation

ShUl0w
Copy link
Contributor

@ShUl0w ShUl0w commented Aug 8, 2024

Resolves #67

Context

This PR removes the coding language from the copied code block, and improves handling of trailing markdown syntax.

Steps to reproduce

Prompt: A regex in python to replace numbers. Do not give an explanation.

Result (> to prevent markdown formatting):

python
import re

text = "Your text with numbers like 123."
result = re.sub(r'\d+', '', text)
print(result)
>```

Current behaviour

The text that's being copied to the clipboard is (> to prevent markdown formatting):

python
import re

text = "Your text with numbers like 123."
result = re.sub(r'\d+', '', text)
print(result)
>```

New behaviour

The text that's being copied to the clipboard is:

import re

text = "Your text with numbers like 123."
result = re.sub(r'\d+', '', text)
print(result)

@ShUl0w ShUl0w mentioned this pull request Aug 8, 2024
@ShUl0w ShUl0w force-pushed the improve-code-copy-behaviour branch from 911837f to c7bc4bd Compare August 8, 2024 06:16
@ShUl0w ShUl0w changed the base branch from main to development August 8, 2024 06:16
@Ariansdf Ariansdf merged commit 6b79ee2 into HAWK-Digital-Environments:development Aug 23, 2024
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

Successfully merging this pull request may close these issues.

Code formatting
2 participants