Skip to content

Commit

Permalink
chore: update doc headings
Browse files Browse the repository at this point in the history
Update doc headings from UpperCase(<sub-command>) to LowerCase(<base-command> <sub-command>).
E.g. a command like `juju add-controller` would receive a title of `ADD-CONTROLLER` but is now `juju add-controller` to better reflect the CLI usage.
This shouldn't affect Juju documentation because there the title is often excluded since each command is documented on a different page, but for other tools using this package the title is more useful.
  • Loading branch information
kian99 committed Jan 28, 2025
1 parent 0458506 commit 5cebac4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion documentation.go
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ func (c *documentationCommand) linkForCommand(cmd string) string {
func (c *documentationCommand) formatCommand(ref commandReference, title bool, commandSeq []string) string {
var fmtedTitle string
if title {
fmtedTitle = strings.ToUpper(strings.Join(commandSeq[1:], " "))
fmtedTitle = strings.ToLower(strings.Join(commandSeq, " "))
}

var buf bytes.Buffer
Expand Down

0 comments on commit 5cebac4

Please sign in to comment.