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

maxLineMarkerWidth only calculated for input format plain. #64

Closed
DigiLive opened this issue Oct 9, 2020 · 3 comments
Closed

maxLineMarkerWidth only calculated for input format plain. #64

DigiLive opened this issue Oct 9, 2020 · 3 comments
Assignees
Labels

Comments

@DigiLive
Copy link
Collaborator

DigiLive commented Oct 9, 2020

if ($this->options['format'] == 'plain') {

I think the if statement can be removed.
Its value should be calculated independently of the input format (plain/html).
It's a helper variable to be used in subRenderers to left-align the lines in the output.

Also at InlineCli.php

$padding = str_repeat(' ', $this->maxLineMarkerWidth - strlen($this->options['equalityMarkers'][0]));

The second parameter of str_repeat should be 0 at least.

        $padding     = str_repeat(' ',
            max($this->maxLineMarkerWidth - strlen($this->options['equalityMarkers'][0]), 0));

or it'll generated a warning.
The same goes for line 119, 143, 197 of this file.

@DigiLive DigiLive added the bug label Oct 9, 2020
@DigiLive DigiLive self-assigned this Oct 12, 2020
@DigiLive
Copy link
Collaborator Author

Will fix when agreed upon and when PR's are merged/closed.

DigiLive added a commit that referenced this issue Oct 13, 2020
Fixes #64 - maxLineMarkerWidth only calculated for input format plain.
@JBlond
Copy link
Owner

JBlond commented Oct 13, 2020

Both of us forgot the change log.

@DigiLive
Copy link
Collaborator Author

DigiLive commented Oct 13, 2020

I've updated the change log in the master branch directly.
I hope it's OK like this.

Maybe we can create a script or something which prepends the change log with commit messages.
Something like $ git log $(git describe --tags --abbrev=0)..HEAD --pretty=format:"%s" -i -E --grep="SOME REGEX HERE" > afile.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants