Skip to content

Commit

Permalink
Fix runner.md when there are no parameters
Browse files Browse the repository at this point in the history
The empty params array was generating a blank line that disrupted the parsing
of block in mkdocs.
  • Loading branch information
segfaultxavi committed Jun 27, 2024
1 parent 6880f0b commit 0254ecd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/runner.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ async function {{filename | replace('-', '_')}}_runner() {
};
try {
await run{{filename | replace('-', '_') }}(
{% for param in params %}document.getElementById('{{param.name}}').value,{% endfor %}
{%- for param in params %}document.getElementById('{{param.name}}').value,{% endfor -%}
);
} catch(error) {
console.log (error.message);
Expand All @@ -54,7 +54,7 @@ async function {{filename | replace('-', '_')}}_runner() {

<details class="run-me" id="{{filename}}-run-me-box">
<summary>Run in browser</summary>
{% for param in params -%}
{%- for param in params -%}
<label for="{{param.name}}">{{param.name}}:</label>
<input type="text" id="{{param.name}}" name="{{param.name}}" value="{{param.value}}"/>
{%- endfor %}
Expand Down

0 comments on commit 0254ecd

Please sign in to comment.