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

Truncate #93

Open
coolguy357 opened this issue May 12, 2023 · 3 comments
Open

Truncate #93

coolguy357 opened this issue May 12, 2023 · 3 comments

Comments

@coolguy357
Copy link

I'd like to enforce a maximum length on my variables with "octostashe", what do you recommend? Truncate would be great if it didn't add an ellipsis and just, you know, truncated.

@ay-azara
Copy link

Replace Truncate with Substring and you won't get any ellipses.

@coolguy357
Copy link
Author

Replace Truncate with Substring and you won't get any ellipses.

That'd be great, and is what I tried first, but for strings shorter than the "max length" it throws up and just returns the template. Would probably be fine If this just returned the string instead. Then all of those folks depending on the ellipses for their critical infrastructure will not be affected.

@ay-azara
Copy link

That is a problem. Not sure what you're use case is but if you're using the variables for a script probably easier to truncate them in the language. If it's for something like release notes, the Octo staff would need to provide a solution. Too bad we can't nest or chain filters.

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