-
Notifications
You must be signed in to change notification settings - Fork 30k
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
Buffer.slice: Added description for the case when end is greater than… #14720
Conversation
… buffer length Fixes nodejs#14714 - issue
doc/api/buffer.md
Outdated
@@ -1907,6 +1907,9 @@ changes: | |||
Returns a new `Buffer` that references the same memory as the original, but | |||
offset and cropped by the `start` and `end` indices. | |||
|
|||
Specifying 'end' greater than ['buf.length'] will return the same result as that of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, but you should use ` instead of '
The resulting HTML looks different, and only [`bug.length`][]
links to the right place - https://github.com/nodejs/node/pull/14720/files?short_path=c4f6105#diff-c4f6105249780774d5b3f276b4e4879f
(edit by @addaleax: fixed markdown)
Hello @vishal7201, welcome and thank you for the contribution 🥇 If you haven't already, you should take a look at the CONTRIBUTING guide. Especially the part the deals with reviewing PRs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM once it has the change requested by @refack.
Thankyou @refack for improvements. I have made the suggested changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for this contribution!
@vishal7201 that you for following up 👍 |
doc/api/buffer.md
Outdated
@@ -1907,6 +1907,9 @@ changes: | |||
Returns a new `Buffer` that references the same memory as the original, but | |||
offset and cropped by the `start` and `end` indices. | |||
|
|||
Specifying `end` greater than [`buf.length`] will return the same result as that | |||
of `end` equal to [`buf.length`] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing .
at the end of the sentence.
Missing full stop added in for paragraph describing buf.slice([start[, end]])
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM (1910 exceeds line length due to trailing whitespace, this will be fixed while landing)
Added description for the case when `end` is greater than buffer length PR-URL: #14720 Fixes: #14714 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
Landed in 89d9cc7 |
Buffer.slice: Added description for the case when 'end' is greater than buffer length
Fixes #14714 - issue
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)