Skip to content

Commit

Permalink
fix: minor whitespace bug in md output
Browse files Browse the repository at this point in the history
  • Loading branch information
jdx committed Sep 28, 2024
1 parent a1128f2 commit dcced73
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions lib/src/docs/markdown/templates/cmd_template.md.tera
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{%- if cmd.help_md %}{% set help = cmd.help_md %}{% elif cmd.help_long %}{% set help = cmd.help_long %}{% else %}{% set help = cmd.help %}{% endif %}
{%- if cmd.after_help_md %}{% set after_help = cmd.after_help_md %}{% elif cmd.after_help_long %}{% set after_help = cmd.after_help_long %}{% else %}{% set after_help = cmd.after_help %}{% endif %}
{%- if multi -%}
{{ "#" | repeat(count=header_level) }} `{{ spec.bin }} {{ cmd.usage }}`
{{ "#" | repeat(count=header_level) }} `{{ spec.bin ~ " " ~ cmd.usage | trim }}`
{%- endif %}
{%- if before_help %}

Expand Down Expand Up @@ -59,7 +59,7 @@

{{ "#" | repeat(count=header_level) }}# Subcommands
{% endif %}
* [`{{ spec.bin }} {{ cmd.usage }}`]({{ url_prefix }}/{{ cmd.full_cmd | join(sep="/") }}.md)
* [`{{ spec.bin ~ " " ~ cmd.usage | trim }}`]({{ url_prefix }}/{{ cmd.full_cmd | join(sep="/") }}.md)
{%- endif -%}
{%- endfor -%}
{%- endif -%}
Expand Down
4 changes: 2 additions & 2 deletions lib/src/docs/markdown/templates/index_template.md.tera
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{%- set about = spec.about_long | default(value=spec.about) %}
{%- set cmd = spec.cmd %}
{{- "#" | repeat(count=header_level) }} `{{ spec.cmd.usage }}`
{{- "#" | repeat(count=header_level) }} `{{ spec.bin ~ " " ~ spec.cmd.usage | trim }}`

{%- if spec.version %}
* **version**: {{ spec.version }}{% endif %}
Expand All @@ -14,5 +14,5 @@

{{ "#" | repeat(count=header_level) }} Subcommands
{% endif %}
* [`{{ spec.bin }} {{ cmd.usage }}`]({{ url_prefix }}/{{ cmd.full_cmd | join(sep="/") }}.md)
* [`{{ spec.bin ~ " " ~ cmd.usage | trim }}`]({{ url_prefix }}/{{ cmd.full_cmd | join(sep="/") }}.md)
{%- endfor -%}
4 changes: 2 additions & 2 deletions lib/src/docs/markdown/templates/spec_template.md.tera
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{%- set about = spec.about_long | default(value=spec.about) %}
{%- set cmd = spec.cmd %}
{{- "#" | repeat(count=header_level) }} `{{ spec.bin }} {{ spec.cmd.usage }}`
{{- "#" | repeat(count=header_level) }} `{{ spec.bin ~ " " ~ spec.cmd.usage | trim }}`

{%- if spec.version %}
* **version**: {{ spec.version }}{% endif %}
Expand All @@ -15,7 +15,7 @@

{%- for cmd in all_commands %}

{{ "#" | repeat(count=header_level) }} `{{ spec.bin }} {{ cmd.usage }}`
{{ "#" | repeat(count=header_level) }} `{{ spec.bin ~ " " ~ cmd.usage | trim }}`

{%- include "cmd_template.md.tera" %}
{%- endfor -%}

0 comments on commit dcced73

Please sign in to comment.