Skip to content

Commit 90cbac6

Browse files
authored
Merge pull request #73 from RedBeard0531/patch-1
Use strformat.fmt rather than strutils.% in features.html
2 parents 3cec5fc + 1360883 commit 90cbac6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

jekyll/features.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ <h2>
2727
</div>
2828
<div class="pure-u-1 pure-u-md-1-2 center">
2929
{% highlight nim %}
30-
import strutils
30+
import strformat
3131
type
3232
Person = object
3333
name*: string # Field is exported using `*`.
@@ -39,7 +39,8 @@ <h2>
3939
]
4040

4141
for person in people:
42-
echo("$1 is $2 years old" % [person.name, $person.age]){% endhighlight %}
42+
# Type-safe string interpolation.
43+
echo(fmt"{person.name} is {person.age} years old"){% endhighlight %}
4344
</div>
4445
</div>
4546
</section>

0 commit comments

Comments
 (0)