klmr / klmr/sys

Line break in description leads to wrong output

Open
#19 0 comments 0 reactions 1 assignee Claimed by @klmr View on GitHub
bug
Dominant language
R
Stars
13
Forks
1
PR merge metrics
No merged PRs in 30d

Description

### MWE:

``` r
sys = modules::import('klmr/sys')

"
foo
bar
"

sys$run({
args = sys$cmd$parse(arg('input', '', ''))
})
```

Leads to the following output when executed via `Rscript scriptpath --help`:

```
\nDescription\nfoobar\n

Usage: scriptpath [input]

Positional arguments:
input (default: "")
```

This contains two errors:
- Newlines (and other special chars) should be correctly parsed in the description string.
- Leading and trailing whitespace (including newlines) should be trimmed.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.