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

Remove unnecessary escapes #74

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Rafatcb
Copy link

@Rafatcb Rafatcb commented Jan 31, 2024

I used the ESLint rule no-useless-escape to highlight unnecessary escapes in the Regex. You can also see this Stack Overflow answer for more details on characters that need to be escaped and those that do not need to be escaped when inside character classes.

I also noticed that the should still remove escaped markdown syntax test is not working correctly, because the string \# Heading in _italic_ is interpreted as # Heading in _italic_, and if you add double backslashes in the beginning (\\# Heading in _italic_) the test fails. You can see more details about using backslashes in strings here.

If you want me to add ESLint as a development dependency to the project, with the no-useless-escape rule as the only active rule, let me know.

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.

2 participants