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

Wrap output changelog at specified line width #464

Open
ItsDrike opened this issue Dec 29, 2022 · 2 comments
Open

Wrap output changelog at specified line width #464

ItsDrike opened this issue Dec 29, 2022 · 2 comments
Labels

Comments

@ItsDrike
Copy link

ItsDrike commented Dec 29, 2022

Is there some way to add support for line wrapping of the output changelog file?

I'd like my output changelog to have a maximum line length of 120 characters, however while my individual fragments are wrapped at 120 chars, the generated changelog also contains links to issues, which means the actual line ends up being much longer.

I suppose that this might be doable with the changelog template file, but I'm not sure how would I do this, any suggestions?

Note that I'm aware that there will need to be a way to distinguish between intentional newlines, and newlines due to some line width wrapping in the fragments. This might be pretty difficult, and so instead, what could be done is just expect the fragments to not be line wrapped at all, so any newlines are treated as intentional, and then wrap the lines at some specified line length.

This way the final changelog will be properly formatted with correct line wrapping, and even though the change fragments won't be able to include wrapping, that's usually not that big of an issue in comparison to not having the actual output changelog wrapped.

Ideally, I'd love to see a config option for this making it very easy to handle line wrapping, but I'm not sure how doable this is, as the template file is user-controlled so the resulting output may have some intentional longer lines etc.

@SmileyChris
Copy link
Contributor

We have a wrap configuration option that's boolean. It defaults to false but when true, wraps to 79.

It'd be great if this also accepted an integer and wrapped to that number.

@adiroiban
Copy link
Member

wrap was added in 18.6.0 ... issue #80

but I can't easily find the PR... and it was a breaking change as the defaut behaviour in 18.5.0 was to wrap by default.


+1 to have this an integer . Happy to review a PR that implements this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants