Skip to content

maxLineMarkerWidth only calculated for input format plain. #64

Description

@DigiLive

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions