Skip to content

Conversation

@adombeck
Copy link

@adombeck adombeck commented Jan 6, 2026

In order to have consistent indentation with the other sections of the usage message (like Usage and Flags), many commands prefix each line in the examples string with two spaces [1]. That looks odd in the generated markdown, so we remove the two-space prefix there, if all lines are prefixed like that.

[1] An example is the cmd.Example string provided in the Generate CLI Docs with Cobra guide.

Related: #1905

In order to have consistent indentation with the other sections of the
usage message (like "Usage" and "Flags"), many commands prefix each line
in the examples string with two spaces. That looks odd in the generated
markdown, so we remove the two-space prefix there, if all lines are
prefixed like that.
@github-actions github-actions bot added the area/docs-generation Generation of docs via Cobra label Jan 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/docs-generation Generation of docs via Cobra

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant