Skip to content

Fixed misaligned paddings when formats other than prefixed hex are used#80

Open
firefish111 wants to merge 3 commits intositkevij:masterfrom
firefish111:misaligned-padding-fix
Open

Fixed misaligned paddings when formats other than prefixed hex are used#80
firefish111 wants to merge 3 commits intositkevij:masterfrom
firefish111:misaligned-padding-fix

Conversation

@firefish111
Copy link
Copy Markdown

When a line is shorter than the specifies column width (-c), and padding is required, the padding amount per byte was hardcoded to 5, which corresponds to the width of one prefixed hex byte plus a space. This causes misalignment when other formattings are used.

This fix selects the appropriate padding width based on the format type.

@sitkevij sitkevij added the enhancement New feature or request label Mar 5, 2024
@firefish111
Copy link
Copy Markdown
Author

Just committed to fix the linter errors

@firefish111
Copy link
Copy Markdown
Author

Added a unit test to check for misaligned padding

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

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants