-
-
Notifications
You must be signed in to change notification settings - Fork 8
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
Incomplete ellipses transforms #9
Comments
a) why would more than 3 dots not turn into ellipses? (1, 3, 4, 6) |
a) Some style guides use a four-dot ellipsis (ellipsis + period) when crossing sentences:
— https://en.wikipedia.org/wiki/Ellipsis#American_English b) These cases can probably be ignored then. But as far as I can tell, many style guides don't explicitly say that the spaced ellipses must be surrounded by spaces (i.e., |
Thanks for the link! To me, your argumentation for a), explains why some people use 4 dots. Not why it should turn into I think what’s complex about trying to follow these style guides, is that they’re all different, they each have different rules, and then also for authors and for “typesetters”. But this project doesn’t follow one specific styleguide. And if we’d do, we’d break with the rest, right? The reason for why four and more periods are turned into ellipsis, is because some humans don’t stop at 3. For example: |
The more I read and think about it, the more complex I realize this is. It's difficult (impossible?) to parse for all these cases, and intuit, with accuracy, what the intended behavior should be—especially if a text uses varying types of ellipses. With that in mind, would you consider adding an option to this package that toggles converting triple-spaced dots (but keeps consecutive-dot conversions for ellipses)? This would give more flexibility, making it easier to apply custom, context-specific regexp replacements after running text through this plugin. |
Yep, same.
Yes, I am open to such a feature. |
Maybe something like updating
|
Maybe! Probably good, but might depend a bit on how the feature you come up with actually works! |
I was thinking of keeping it simple and only adding options for enabling/disabling formatting of spaced vs. unspaced ellipses (keeping the ellipses length regex as-is). |
Initial checklist
Affected packages and versions
[email protected]
Link to runnable example
No response
Steps to reproduce
I think the ellipses transforms are incomplete.
Here are some examples of what happens currently:
foo.... bar
->foo… bar
foo. . .bar
->foo. . .bar
foo. . .. bar
->foo… bar
foo. . . . bar
->foo… . bar
foo . . .bar
->foo . . .bar
foo. . . .bar
->foo… .bar
Expected behavior
I would expect those examples to return these values instead:
foo.... bar
->foo…. bar
foo. . .bar
->foo…bar
foo. . .. bar
->foo…. bar
foo. . . . bar
->foo…. bar
foo . . .bar
->foo …bar
foo. . . .bar
->foo. …bar
Affected runtime and version
[email protected]
Affected package manager and version
No response
Affected OS and version
No response
Build and bundle tools
No response
The text was updated successfully, but these errors were encountered: