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: handle primes properly in text filetypes (#345) #346

Closed
wants to merge 1 commit into from
Closed

fix: handle primes properly in text filetypes (#345) #346

wants to merge 1 commit into from

Conversation

Bekaboo
Copy link

@Bekaboo Bekaboo commented Apr 3, 2023

In text files (markdown, tex, text, ...) primes should not be considered as opening single quotes, consider the following example:

Ben's friends say: '...'

The first single quote should not be considered as an opening single quote.

In this commit we treat single quotes directly following a word character as a prime. This only applies to text filetypes, as programming languages usually have stricter syntax and won't allow this.

@windwp
Copy link
Owner

windwp commented Apr 5, 2023

Thank to fix this.

you don't need to check filetype just checking it is a single quote and have word before it.
can you add test case ?

@Bekaboo
Copy link
Author

Bekaboo commented Apr 5, 2023

Hi, thanks for your reply. To be honest I'm not sure how to add and run test properly for this project and I'll be quite busy in the following month. Could you help me with the test cases? Or I can add them when I have time.

In text files (markdown, tex, text, ...) primes should not be considered
as opening single quotes, consider the following example:

    Ben's friends say: '...'

The first single quote should not be considered as an opening single
quote.

In this commit we treat single quotes directly following a word
character as a prime. This only applies to text filetypes.
@windwp windwp closed this in bd17022 Apr 29, 2023
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.

None yet

2 participants