Add a code figure and get highlighted lines to wrap
This commit is contained in:
parent
e029548d04
commit
6af32976c6
3 changed files with 25 additions and 5 deletions
5
layouts/shortcodes/figures/code.html
Normal file
5
layouts/shortcodes/figures/code.html
Normal file
|
@ -0,0 +1,5 @@
|
|||
{{ $lang := .Get "lang" }}
|
||||
{{ $trimmedCode := trim .Inner "\n " }}
|
||||
<figure class="code">
|
||||
{{ transform.Highlight $trimmedCode $lang }}
|
||||
</figure>
|
Loading…
Add table
Add a link
Reference in a new issue