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

[Core utils] Add split after argument for pagify #5691

Open
Kowlin opened this issue May 6, 2022 · 1 comment
Open

[Core utils] Add split after argument for pagify #5691

Kowlin opened this issue May 6, 2022 · 1 comment
Assignees
Labels
Category: Core - API - Utils Package This is related to stuff in `redbot.core.utils` Status: Accepted We want this Type: Enhancement Something meant to enhance existing Red features.

Comments

@Kowlin
Copy link
Member

Kowlin commented May 6, 2022

Add an argument to slow pagify to split after a deliminator. So that the delim is kept in the previous page. Use cases for this include dots, and comma's.

@github-actions github-actions bot added the Status: Needs Triage This has not been labeled or discussed for handling yet. label May 6, 2022
@Kowlin Kowlin self-assigned this May 6, 2022
@Kowlin Kowlin added Category: Core - API - Utils Package This is related to stuff in `redbot.core.utils` and removed Status: Needs Triage This has not been labeled or discussed for handling yet. labels May 6, 2022
@Jackenmen Jackenmen added Status: Accepted We want this Status: PRs Welcome No one is currently assigned to this issue, but we'd be grateful if anyone made a PR. Type: Enhancement Something meant to enhance existing Red features. and removed Status: PRs Welcome No one is currently assigned to this issue, but we'd be grateful if anyone made a PR. labels May 6, 2022
@Jackenmen
Copy link
Member

It has been suggested to make this (splitting after) a default and to also consider adding str.splitlines-like keepends argument that would strip the delimiter if it's set to False (and I guess that means removing the "split before" functionality entirely).

The exact way this should behave is currently unclear and I think it might be a good time to write a bunch of test cases for pagify() and consider how we would want it and this new functionality to behave when it comes to stripping delimiters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: Core - API - Utils Package This is related to stuff in `redbot.core.utils` Status: Accepted We want this Type: Enhancement Something meant to enhance existing Red features.
Projects
None yet
Development

No branches or pull requests

2 participants