diff --git a/Library/Homebrew/dev-cmd/man.rb b/Library/Homebrew/dev-cmd/man.rb index c610ef523d..587e44b0e9 100644 --- a/Library/Homebrew/dev-cmd/man.rb +++ b/Library/Homebrew/dev-cmd/man.rb @@ -195,7 +195,9 @@ module Homebrew line = line.slice(4..-1) next unless line - lines << line.gsub(/^ +(-+[a-z-]+) */, "* `\\1`:\n ") + # Format one option or a comma-separated pair of short and long options. + lines << line.gsub(/^ +(-+[a-z-]+), (-+[a-z-]+) +/, "* `\\1`, `\\2`:\n ") + .gsub(/^ +(-+[a-z-]+) +/, "* `\\1`:\n ") end lines end