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

Extra line breaks after coloured lines in detail view #10

Closed
evilquinn opened this issue Apr 20, 2022 · 6 comments
Closed

Extra line breaks after coloured lines in detail view #10

evilquinn opened this issue Apr 20, 2022 · 6 comments
Assignees

Comments

@evilquinn
Copy link
Contributor

Hey, excellent extension, thanks.

In my client, there appeared to be extra line breaks in the detail output.

Here's raw output on a terminal:
image

And here's a view of the detail output for the same commit:
image

Snapshot of the raw html:
image

@evilquinn
Copy link
Contributor Author

think it's down to an extra \n being added during colouring of changed lines here:

.replace(/^(-[^\n]*)/mg, m => `<span style="color: #ff2441;">${m.replace(/\n$/, '')}</span>\n`)
.replace(/^(\+[^\n]*)/mg, m => `<span style="color: #00c02b;">${m.replace(/\n$/, '')}</span>\n`)

@evilquinn
Copy link
Contributor Author

question: is this a feature? and not a defect?

I ask because this appears to have been the case since the first commit here, and the demo gif in the readme shows these extra breaks...

@leftstick
Copy link
Owner

Hi @evilquinn thanks for your questions, i don't think it is a feature.
@geforcesong would you please check it? Thanks

@evilquinn
Copy link
Contributor Author

fixed by #11
thanks!

@leftstick
Copy link
Owner

@evilquinn already published to martketplace, thanks for your awesome work

@evilquinn
Copy link
Contributor Author

unbelievable!
great stuff everyone, thank you!.

(if of interest, my first ever pull-request to someone else's github project! feels good)

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

No branches or pull requests

3 participants