sharkdp / hexyl

A command-line hex viewer
Apache License 2.0
8.93k stars 227 forks source link

Fix squeeze state machine and squeeze indicator coloring #64

Closed awidegreen closed 5 years ago

awidegreen commented 5 years ago

Fixes squeeze state-machine for first/last

Consider equality for first and last character of a line.

If the first or last character of a line is not equal to previous character, the state machine should be set back to probe as the line should not be squeezed.

The unit tests has been expanded for testing the use case described in #62. Further the body of all unit tests has been simplified.

Fixes #62


Consider color when printing squeeze indicator

When color option has been set to never, the squeeze indicator character asterisk '*' should not be printed in color.

Fixes #63

sharkdp commented 5 years ago

Thank you so much!