Skip to content

Commit b15aa36

Browse files
committed
🐛 🔥 Deprecated usage of Twig replace filter
1 parent dae0c77 commit b15aa36

File tree

7 files changed

+11
-11
lines changed

7 files changed

+11
-11
lines changed

data/templates/vuepress/anchor-link-method.md.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@
66
{%- set parent_location = 'traits' %}
77
{%- endif -%}
88

9-
<a href="{{ parent_location }}.html#{{ method|trim('\\()')|replace('\\', '-') }}">
9+
<a href="{{ parent_location }}.html#{{ method|trim('\\()')|replace({'\\': '-'}) }}">
1010
{{- text|default(method.name|default(method))|raw -}}
1111
</a> {{ '' -}}

data/templates/vuepress/anchor-link-property.md.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@
66
{%- set parent_location = 'traits' %}
77
{%- endif -%}
88

9-
<a href="{{ parent_location }}.html#{{ property.parent|trim('\\')|replace('\\', '-') }}::${{ property.name }}">
9+
<a href="{{ parent_location }}.html#{{ property.parent|trim('\\')|replace({'\\': '-'}) }}::${{ property.name }}">
1010
{{- text|default(property.name|default(property))|raw -}}
1111
</a> {{ '' -}}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<a id="{{ method|trim('\\()')|replace('\\', '-') }}" style="display: block; position: relative; top: -5rem; visibility: hidden;"></a> {{ ''-}}
1+
<a id="{{ method|trim('\\()')|replace({'\\': '-'}) }}" style="display: block; position: relative; top: -5rem; visibility: hidden;"></a> {{ ''-}}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<a id="{{ property.parent|trim('\\')|replace('\\', '-') }}::${{ property.name }}" style="display: block; position: relative; top: -5rem; visibility: hidden;"></a> {{ ''-}}
1+
<a id="{{ property.parent|trim('\\')|replace({'\\': '-'}) }}::${{ property.name }}" style="display: block; position: relative; top: -5rem; visibility: hidden;"></a> {{ ''-}}

data/templates/vuepress/struct-class.md.twig

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,23 +57,23 @@
5757
| **Extends** |
5858
{%- if class.parent -%}
5959
[{{ class.parent.namespace|trim('\\') -}}\\<span style="font-weight: bold;">{{ class.parent.name }}</span>](/api/classes.html#
60-
{{- class.parent|trim('\\')|lower|replace('\\', '-') }})
60+
{{- class.parent|trim('\\')|lower|replace({'\\': '-'}) }})
6161
{%- else -%}
6262
_Nothing_
6363
{%- endif -%}
6464
|
6565
| **Implements** |
6666
{%- for iname, ishort in interfaces if ishort is not empty -%}
6767
[{{ iname|trim('\\')|split('\\')|slice(0, -1)|join('\\') }}\\<span style="font-weight: bold;">{{ ishort }}</span>](/api/interfaces.html#
68-
{{- iname|lower|replace('\\', '-') }}) <br />
68+
{{- iname|lower|replace({'\\': '-'}) }}) <br />
6969
{%- else -%}
7070
_Nothing_
7171
{%- endfor -%}
7272
|
7373
| **Uses** |
7474
{%- for tName, tShort in traits if tShort is not empty -%}
7575
[{{ tName|trim('\\')|split('\\')|slice(0, -1)|join('\\') }}\\<span style="font-weight: bold;">{{ tShort }}</span>](/api/traits.html#
76-
{{- tName|trim('\\')|lower|replace('\\', '-') }}) <br />
76+
{{- tName|trim('\\')|lower|replace({'\\': '-'}) }}) <br />
7777
{%- else -%}
7878
_Nothing_
7979
{%- endfor -%}
@@ -111,7 +111,7 @@
111111
{%- endif %}
112112

113113
- [{{ method.parent.namespace|trim('\\') -}}\\<span style="font-weight: bold;">{{ method.parent.name }}</span>](/api/{{ parent_location }}.html#
114-
{{- method.parent|trim('\\')|lower|replace('\\', '-') -}}
114+
{{- method.parent|trim('\\')|lower|replace({'\\': '-'}) -}}
115115
)::
116116
{{- include('anchor-link-method.md.twig', { text: method.name ~ '()' }) -}}
117117
{{ include('badges.md.twig', { elem: method }) }}
@@ -141,7 +141,7 @@
141141
{%- endif %}
142142

143143
- [{{ property.parent.namespace|trim('\\') -}}\\<span style="font-weight: bold;">{{ property.parent.name }}</span>](/api/{{ parent_location }}.html#
144-
{{- property.parent|trim('\\')|lower|replace('\\', '-') -}}
144+
{{- property.parent|trim('\\')|lower|replace({'\\': '-'}) -}}
145145
)::
146146
{{- include('anchor-link-property.md.twig', { text: '$' ~ property.name }) -}}
147147
{{ include('badges.md.twig', { elem: property }) }}

data/templates/vuepress/struct-interface.md.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
| **Extends** |
3333
{%- for iname, ishort in parents if ishort is not empty -%}
3434
[{{ iname|trim('\\')|split('\\')|slice(0, -1)|join('\\') }}\\<span style="font-weight: bold;">{{ ishort }}</span>](/api/interfaces.html#
35-
{{- iname|lower|replace('\\', '-') }}) <br />
35+
{{- iname|lower|replace({'\\': '-'}) }}) <br />
3636
{%- else -%}
3737
_Nothing_
3838
{%- endfor -%}

data/templates/vuepress/struct-trait.md.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
| **Uses** {# FIXME #} |
3232
{%- for tName, tShort in usedTraits if tShort is not empty -%}
3333
[{{ tName|trim('\\')|split('\\')|slice(0, -1)|join('\\') }}\\<span style="font-weight: bold;">{{ tShort }}</span>](/api/traits.html#
34-
{{- tName|trim('\\')|lower|replace('\\', '-') }}) <br />
34+
{{- tName|trim('\\')|lower|replace({'\\': '-'}) }}) <br />
3535
{%- else -%}
3636
_Nothing_
3737
{%- endfor -%}

0 commit comments

Comments
 (0)