Skip to content

feat: update wrap functionality#104

Open
dmitry-prohorov wants to merge 5 commits intoleoforfree:masterfrom
dmitry-prohorov:master
Open

feat: update wrap functionality#104
dmitry-prohorov wants to merge 5 commits intoleoforfree:masterfrom
dmitry-prohorov:master

Conversation

@dmitry-prohorov
Copy link
Copy Markdown

@dmitry-prohorov dmitry-prohorov commented Nov 10, 2019

Hi,

Thank you for this amazing tool!

When I try to use this tool and describe my body with breaklineChar feature I've faced trouble. You are wrapping the entire body into 100 characters lines and after that add break lines. So if I type 1. update description|2. add commit message format section|3. add docker section|4. add commit helper tool section into the body I will see next result (which is not expected)

###--------------------------------------------------------###
docs: update docs

1. update description
2. add commit message format section
3. add docker section
4. add commit
helper tool section
###--------------------------------------------------------###

But I want to see

###--------------------------------------------------------###
docs: update docs

1. update description
2. add commit message format section
3. add docker section
4. add commit helper tool section
###--------------------------------------------------------###

In latest node versions
fs.write(fd, string[, position[, encoding]], callback)
The callback parameter is no longer optional. Not passing it will throw a TypeError at runtime.
Wrap only separate lines with 100 character limit
Copy link
Copy Markdown
Member

@leonardoanalista leonardoanalista left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

awesome! lgtm, we merge when test passes. Please commit as a fix too. 👏 👏 👏

Comment thread buildCommit.js

const addBreaklinesIfNeeded = (value, breaklineChar = defaultBreaklineChar) =>
value
const addBreaklinesIfNeededAndWrap = (value = '', config) => {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that sounds perfect to me! thanks for the fix!

@dmitry-prohorov
Copy link
Copy Markdown
Author

@leonardoanalista done

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.

2 participants