Add a code figure and get highlighted lines to wrap

This commit is contained in:
Eryn Wells 2022-10-01 10:22:02 -07:00
parent e029548d04
commit 6af32976c6
3 changed files with 25 additions and 5 deletions

View file

@ -0,0 +1,5 @@
{{ $lang := .Get "lang" }}
{{ $trimmedCode := trim .Inner "\n " }}
<figure class="code">
{{ transform.Highlight $trimmedCode $lang }}
</figure>