mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Dumb auto-format
This commit is contained in:
parent
e3e4cac9c1
commit
edabaa9447
1 changed files with 13 additions and 15 deletions
|
@ -114,11 +114,10 @@ module Spectator
|
||||||
let({{assignment.target}}) { {{assignment.value}} }
|
let({{assignment.target}}) { {{assignment.value}} }
|
||||||
{% end %}
|
{% end %}
|
||||||
|
|
||||||
{%
|
{% # Trick to get the contents of the block as an array of nodes.
|
||||||
# Trick to get the contents of the block as an array of nodes.
|
# If there are multiple expressions/statements in the block,
|
||||||
# If there are multiple expressions/statements in the block,
|
# then the body will be a `Expressions` type.
|
||||||
# then the body will be a `Expressions` type.
|
# If there's only one expression, then the body is just that.
|
||||||
# If there's only one expression, then the body is just that.
|
|
||||||
body = if block.is_a?(Nop)
|
body = if block.is_a?(Nop)
|
||||||
raise "Missing block for 'given'"
|
raise "Missing block for 'given'"
|
||||||
elsif block.body.is_a?(Expressions)
|
elsif block.body.is_a?(Expressions)
|
||||||
|
@ -127,8 +126,7 @@ module Spectator
|
||||||
else
|
else
|
||||||
# Wrap the expression in an array.
|
# Wrap the expression in an array.
|
||||||
[block.body]
|
[block.body]
|
||||||
end
|
end %}
|
||||||
%}
|
|
||||||
|
|
||||||
{% for item in body %}
|
{% for item in body %}
|
||||||
# If the item starts with "it", then leave it as-is.
|
# If the item starts with "it", then leave it as-is.
|
||||||
|
|
Loading…
Reference in a new issue