Closed nam-hle closed 3 years ago
Totals | |
---|---|
Change from base Build 325: | 0.0% |
Covered Lines: | 363 |
Relevant Lines: | 363 |
These PRs are great!
These PRs are great!
:tada: This PR is included in version 6.6.0 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
This PR adds the justify alignment feature (#167). The solution is to calculate the number array of adding spaces, which has a length that is equal to the number of continuous space sequences and has a sum is equal to the available width. To be prettier, the array should be a non-decreasing one, and the difference between the maximum and minimum value is not greater than 1.
Example with total width = 10:
The issue is when the string is too short (e.g., the last line of a paragraph), I propose to fallback to left align if we have to add more than 03 spaces in one place (instead of calculating more information about the surrounding lines). So:
Here is the demo from moonMission file with justify the last column: