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

templater: add pad_center template function #5542

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

steadmon
Copy link
Member

I started out trying to implement a pad_between function as suggested on the feature request, but got bogged down because all of the template wrapping expects a single content argument. If you think it's still worth pursuing that approach, I can spend Monday working on it, but I thought it might be more useful to get a simpler fix out faster.

Fixes #5066.

Checklist

If applicable:

  • I have updated CHANGELOG.md
  • I have updated the documentation (README.md, docs/, demos/)
  • I have updated the config schema (cli/src/config-schema.json)
  • I have added tests to cover my changes

Add a new pad_center function that centers content within a minimum
width. If an odd number of fill characters is required, the trailing
fill will be one character longer than the leading fill.

Fixes jj-vcs#5066.
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.

FR: Add pad_center template function
1 participant