Skip to content

Commit ec27fa4

Browse files
committed
🔥 'optional' from global badges template
1 parent b7cdd1d commit ec27fa4

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

data/templates/vuepress/badges.md.twig

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,4 @@
1616
<Badge text="deprecated" type="error"/>
1717
{%- endif -%}
1818

19-
{%- if elem.default -%}
20-
<Badge text="optional" type="warn"/>{{-' '}}
21-
{%- endif -%}
22-
2319
{{- ' ' -}}

data/templates/vuepress/method.md.twig

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717
| Parameter | Type(s) | Description |
1818
|-----------|------|-------------|
1919
{% for argument in method.arguments %}
20-
| `{{ argument.name }}` {{ include('badges.md.twig', { elem: argument }) }} | **`{{ argument.types|default(['mixed'])|sort_asc|join('`** <br /> **`')|raw }}`** | {{ argument.description|replace({'|': '&#124;', "\n": ' ', "\r": ' '})|raw }} |
20+
| `{{ argument.name }}` {% if argument.default %}<Badge text="optional" type="warn"/>{% endif -%}
21+
| **`{{ argument.types|default(['mixed'])|sort_asc|join('`** <br /> **`')|raw }}`** | {{ argument.description|replace({'|': '&#124;', "\n": ' ', "\r": ' '})|raw }} |
2122
{% endfor %}
2223
{% endif %}{# method.arguments is not empty #}
2324

0 commit comments

Comments
 (0)