-
Notifications
You must be signed in to change notification settings - Fork 27
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
Template commit subjects have added linebreaks (Markdown + LF line breaks) #84
Comments
Word wrap has been added here 3338cf2. You can probably play with the line length config. Maybe it is better to remove this wrapping, but enforce a max length in the
|
The Feel free to close this ticket or keep it open if you plan to do something on this or not. |
I think it would be better to move the word wrap logic to a handlebars helper.
The word wrap could be applied when doing |
Currently lines are wrapped based on the description only but not on the scope. Now the word-wrap is part of the template and takes the full line into account. ```hbs {{#word-wrap}} .. {{/word-wrap}} ``` This also add control for word wrap and line length as flags. `--no-wrap` to disable wrapping. `--line-length <LINE_LENGTH>` to set the line length. Refs: #84
Currently lines are wrapped based on the description only but not on the scope. Now the word-wrap is part of the template and takes the full line into account. ```hbs {{#word-wrap}} .. {{/word-wrap}} ``` This also add control for word wrap and line length as flags. `--no-wrap` to disable wrapping. `--line-length <LINE_LENGTH>` to set the line length. Refs: #84
Currently lines are wrapped based on the description only but not on the scope. Now the word-wrap is part of the template and takes the full line into account. ```hbs {{#word-wrap}} .. {{/word-wrap}} ``` This also add control for word wrap and line length as flags. `--no-wrap` to disable wrapping. `--line-length <LINE_LENGTH>` to set the line length. Refs: #84
I added the option to disable word wrap for the default template, or if you use a custom template, the word-wrap will not be done if you do not use the For the newlines I think one solution could be to pass in If you think i should do something more for this ticket please tell, otherwise i will close it soon. |
In case you use a default template and do not use a word-wrap block (see commit.hbs:1) no wrapping will be performed. |
Ah, so if the template does not have the Awesome, thank you. I will be using the new default behavior - of no line wrapping/breaking at all. Regarding line endings |
Using a --template template.hbs, commit title seems to have newlines added (with
\n
markdown + unix newline) on width excedding 86(?) characters.For a template with
\r\n
(CR LF) newlines, the added\n
newlines lead to mixed EOL of the text document.Adding the Markdown two-space-line-break prevents template customization from being potentially useful for alternative output formats.
Writing the template file I would not have expected newlines to be added.
Reading the changelog as text, the broken line continuing without indentation makes it subjectively harder to read - even if/while rendered Markdown renders it indented.
Git commit summaries are supposed to be short when creating them. If they are designed and written by the author in a narrowed environment, it seems unnecessary to impose own, potentially different length rules that lead to different output.
I adjusted the template to be a list of commit summaries. It may be more obvious in this case over the default template with additional information.
I suggest filling
commits
subject
without adding line breaks to them. I see no downsides in rendering as-is. But as argued, I see various downsides of different degrees in adding newlines.The text was updated successfully, but these errors were encountered: