Incomplete sanitization of arguments' names: Some hyphens not converted into underscores

Issue #32 resolved
Former user created an issue

Some hyphens are not converted into underscores in the sanitization of arguments' names. Consider the following example, in which the hyphen of nn-proc is converted whereas the hyphen of n-proc is not converted.

library("argparser")
ap <- arg_parser("foo")
ap <- add_argument(ap, "--n-proc", default=1L, help="bar")
ap <- add_argument(ap, "--nn-proc", default=1L, help="baz")
args <- parse_args(ap)
names(args)
[1] ""        "help"    "opts"    "n-proc"  "nn_proc"

I'm using version 0.7.1 of argparser.

Comments (1)

  1. Log in to comment