Skip to content

Commit

Permalink
Allow / as a separator for options
Browse files Browse the repository at this point in the history
Signed-off-by: Takuya Noguchi <[email protected]>
  • Loading branch information
tnir committed Jun 26, 2022
1 parent e831303 commit fb88ab8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions command-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,7 @@ Install a gem into the local repository
* `--without GROUPS` - Omit the named groups (comma separated) when installing from a gem dependencies file
* `--default` - Add the gem's full specification to specifications/default and extract only its bin
* `--explain` - Rather than install the gems, indicate which would be installed
* `--[no-]lock` - Create a lock file (when used with `-g`/--file)
* `--[no-]lock` - Create a lock file (when used with `-g`/`--file`)
* `--[no-]suggestions` - Suggest alternates when gems are not found

### Local/Remote Options
Expand Down Expand Up @@ -996,7 +996,7 @@ Restores installed gems to pristine condition from files located in the gem cach
### Options

* `--all` - Restore all installed gems to pristine condition
* `--skip=gem_name` - used on `--all,` skip if name == gem_name
* `--skip=gem_name` - used on `--all`, skip if name == gem_name
* `--[no-]extensions` - Restore gems with extensions in addition to regular gems
* `--only-executables` - Only restore executables
* `--only-plugins` - Only restore plugins
Expand Down Expand Up @@ -1608,7 +1608,7 @@ Update installed gems to the latest version
* `--without GROUPS` - Omit the named groups (comma separated) when installing from a gem dependencies file
* `--default` - Add the gem's full specification to specifications/default and extract only its bin
* `--explain` - Rather than install the gems, indicate which would be installed
* `--[no-]lock` - Create a lock file (when used with `-g`/--file)
* `--[no-]lock` - Create a lock file (when used with `-g`/`--file`)
* `--[no-]suggestions` - Suggest alternates when gems are not found

### Local/Remote Options
Expand Down
2 changes: 1 addition & 1 deletion lib/options_list_markdownizer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,6 @@ def markdownize_options(line)
private

def markdownize_inline_options(line)
line.gsub(/(?<=\s)(--[^\s]+|-[^\s])/, '`\1`')
line.gsub(/(?<=[\s\/])(--[\w\[\]\-]+|-\w)/, '`\1`')
end
end
4 changes: 2 additions & 2 deletions spec/options_list_markdownizer_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@
'short option and boolean switch long',
],
[
" -K, --private-key KEY Key for --sign or --build\n",
" `-K, --private-key KEY` Key for `--sign` or `--build`\n",
" -K, --private-key KEY Key for --sign or --build. -g/--file can be used.\n",
" `-K, --private-key KEY` Key for `--sign` or `--build`. `-g`/`--file` can be used.\n",
'long option in description',
],
[
Expand Down

0 comments on commit fb88ab8

Please sign in to comment.