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

Don't split on ellipses #11

Open
waldyrious opened this issue Nov 5, 2023 · 1 comment
Open

Don't split on ellipses #11

waldyrious opened this issue Nov 5, 2023 · 1 comment

Comments

@waldyrious
Copy link
Contributor

waldyrious commented Nov 5, 2023

I believe it's not safe to always split sentences on ellipses. For example, the following sentence (initially mentioned at DavidAnson/markdownlint#719 (comment)):

Pausing... for... thought... should not [trigger splitting].

...currently splits as

'Pausing...',
'for...',
'thought...',
'should not [trigger splitting]'

but should remain as a single sentence.

/cc @DavidAnson @aepfli

@aepfli
Copy link

aepfli commented Nov 6, 2023

Hey, I extracted this whole rule into a different repo - https://github.com/aepfli/markdownlint-rule-max-one-sentence-per-line

and within the test, it clearly states that theoretically, you could add ... to the ignore_words - we do not have any kind of fancy logic in there to detect sentences. We commonly only detect certain chars (or combinations) and split on those. That is also the reason why I renamed my liniting rule to max-one-sentence-per-line. This way, I removed the need to combine split sentences, etc. - https://github.com/aepfli/markdownlint-rule-max-one-sentence-per-line/blob/main/test/sentences-per-line.md - is my updated version of the test

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

2 participants