TanklesXL / glint

Gleam command-line argument parsing with flags and automated help text generation.
https://hex.pm/packages/glint
Apache License 2.0
48 stars 7 forks source link

🐛 Incorrect indentation in help text for long flags. #21

Closed hayleigh-dot-dev closed 3 weeks ago

hayleigh-dot-dev commented 6 months ago

By the looks of it, glint my have an off-by-one error when calculating how to indent the descriptions for flags that is causing certain flags to be indented a level further than they should:

% gleam run -m lustre/try -- --help
  Compiling lustre
   Compiled in 0.18s
    Running lustre/try.main
USAGE:
        lustre/try [ ARGS ] [ --host=<INT> --include-styles=<BOOL> --port=<STRING> ]

FLAGS:
        --help                  Print help information
        --host=<INT>            The port to run the server on
        --include-styles=<BOOL>         Include lustre_ui's stylesheet in your app.
        --port=<STRING>         The host to run the server on
richard-viney commented 3 weeks ago

Fixed by #41