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

Add option for including context before and after a label #331

Merged
merged 2 commits into from
Aug 9, 2021

Conversation

elkowar
Copy link
Contributor

@elkowar elkowar commented Aug 6, 2021

This PR implements #29!
I'm not sure that this is the best way to implement this, as i'm not all that deep into the codebase. If necessary, i'd appreciate any suggestions or tips on how to improve this!

Copy link
Collaborator

@Johann150 Johann150 left a comment

Choose a reason for hiding this comment

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

Hi, thanks for your contribution. I am not sure your code does what the issue asks for. See the below more specific comments for that.

As per the Quality Standards outlined in the Contribution Guidelines I would (also) ask you to please include some tests for this added functionality.

codespan-reporting/src/term/views.rs Outdated Show resolved Hide resolved
codespan-reporting/src/term/views.rs Outdated Show resolved Hide resolved
@elkowar
Copy link
Contributor Author

elkowar commented Aug 9, 2021

I added a test to verify the implementation, and fixed the code in the view logic! 😄

- use checked_sub in favour of unclear usize::min
- remove `rev` because it does the opposite of what it was supposed to do
- add some comments
Copy link
Collaborator

@Johann150 Johann150 left a comment

Choose a reason for hiding this comment

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

That wraps this up. Thanks again for your contribution!

@Johann150 Johann150 merged commit c604dc4 into brendanzab:master Aug 9, 2021
mbartlett21 pushed a commit to mbartlett21/codespan that referenced this pull request Oct 28, 2021
…#331)

* Add option for including context before and after a label

* simplify logic:
- use checked_sub in favour of unclear usize::min
- remove `rev` because it does the opposite of what it was supposed to do
- add some comments

Co-authored-by: Johann150 <johann.galle@protonmail.com>
@andylokandy
Copy link

When will this be released?

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.

None yet

3 participants