Skip to content

Commit 0359742

Browse files
authored
Merge pull request #123 from kian99/update-doc-heading
#123 This PR updates the documentation markdown generator. Specifically, it changes document headings from UpperCase(<sub-command>) to LowerCase(<base-command> <sub-command>). E.g. a command like `juju add-controller` would include a title of `ADD-CONTROLLER` but with this change becomes `juju add-controller` and better reflects 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. This change was prompted by the `jimmctl` reference docs at https://canonical-jaas-documentation.readthedocs-hosted.com/en/latest/reference/jimmctl/ cc @tmihoc Partially fixes [JUJU-7372](https://warthogs.atlassian.net/browse/JUJU-7372) [JUJU-7372]: https://warthogs.atlassian.net/browse/JUJU-7372?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
2 parents 0458506 + 5cebac4 commit 0359742

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

documentation.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@ func (c *documentationCommand) linkForCommand(cmd string) string {
357357
func (c *documentationCommand) formatCommand(ref commandReference, title bool, commandSeq []string) string {
358358
var fmtedTitle string
359359
if title {
360-
fmtedTitle = strings.ToUpper(strings.Join(commandSeq[1:], " "))
360+
fmtedTitle = strings.ToLower(strings.Join(commandSeq, " "))
361361
}
362362

363363
var buf bytes.Buffer

0 commit comments

Comments
 (0)