Skip to content

Commit ff4b3e3

Browse files
Fix oop syntax display
1 parent 71d2246 commit ff4b3e3

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

web/resources/function.html

+5-3
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ <h3>Pair: <a href="/{{ function[type_name].pair }}">{{ function[type_name].pair
114114
<h2 id="syntax">Syntax <a href="#syntax"><i class="fa-solid fa-link"></i></a></h2>
115115
{% if function.syntaxes.single %}
116116
{% set syntax = function.syntaxes.single %}
117-
<div style="padding-left: 1em; margin-top: 1em; border: 1px solid {{ info_color }}; border-radius: 5px;">
117+
<div style="padding-left: 1em; margin-top: 1em; border: 1px solid {{ info_color }}; border-radius: 5px;">
118118

119119
<pre><code class="language-lua">{{ syntax.returns.values_type or 'void' }} {{ function.name }} ( {% for parameter in syntax.arguments.required %}{{ parameter.type }} {{ parameter.name }}{% if not loop.last %}, {% endif %}{% endfor %}{% for parameter in syntax.arguments.optional %}{% if syntax.arguments.required %}, {% endif %}{% if loop.first %}[ {% endif %}{{ parameter.type }} {{ parameter.name }} = {{ parameter.default }}{% if loop.last %} ]{% endif %}{% endfor %} )</code></pre>
120120

@@ -145,12 +145,11 @@ <h3>Returns:</h3>
145145
<li>{{ item.type }} {{ item.name }}</li>
146146
{% endfor %}
147147
</ul>
148-
149148
{% else %}
150149
{% for type_name in ['server', 'client'] %}
151150
{% set syntax = function.syntaxes[type_name] %}
152151
{% if syntax %}
153-
<div style="padding-left: 1em; margin-top: 1em; border: 1px solid {{ type_colors[type_name] }}; border-radius: 5px;">
152+
<div style="padding-left: 1em; margin-top: 1em; border: 1px solid {{ type_colors[type_name] }}; border-radius: 5px;">
154153
<h3 style="color: {{ type_colors[type_name] }};">{{ type_name|capitalize }}:</h3>
155154

156155
<pre><code class="language-lua">{{ syntax.returns.values_type or 'void' }} {{ function.name }} ( {% for parameter in syntax.arguments.required %}{{ parameter.type }} {{ parameter.name }}{% if not loop.last %}, {% endif %}{% endfor %}{% for parameter in syntax.arguments.optional %}{% if syntax.arguments.required %}, {% endif %}{% if loop.first %}[ {% endif %}{{ parameter.type }} {{ parameter.name }} = {{ parameter.default }}{% if loop.last %} ]{% endif %}{% endfor %} )</code></pre>
@@ -182,6 +181,7 @@ <h4>Returns:</h4>
182181
<li>{{ item.type }} {{ item.name }}</li>
183182
{% endfor %}
184183
</ul>
184+
</div>
185185
{% endif %}
186186
{% endfor %}
187187
{% endif %}
@@ -211,7 +211,9 @@ <h3>OOP syntax: <a href="/OOP_Introduction" ><i class="fa-regular fa-circle-ques
211211
{% endif %}
212212
{% endif %}
213213
{% endfor %}
214+
{% if function.syntaxes.single %}
214215
</div>
216+
{% endif %}
215217

216218
<!-- Preview Images -->
217219
{% for type_name in ['shared', 'client', 'server'] %}

0 commit comments

Comments
 (0)