fix(codeblock): pass through the options of chroma

Pass through the options of chroma highlighting processing for whom
may use some options in codeblock.

This commit fix problem with the following scenarios:
```python {linenos=true}
print("Hello World")
```

Signed-off-by: cubercsl <2014cais01@gmail.com>
This commit is contained in:
cubercsl 2022-11-01 20:06:12 +08:00
parent 2035beb5a0
commit 9f042524a9
No known key found for this signature in database
GPG Key ID: 45C64B19E9161E41

View File

@ -13,7 +13,7 @@
</header>
<code id="codeblock-id-{{ .Ordinal }}" style="display:none;">{{- .Inner -}}</code>
{{- if transform.CanHighlight $lang -}}
<div class="{{ $class }}">{{- highlight .Inner $lang -}}</div>
<div class="{{ $class }}">{{- highlight .Inner $lang .Options -}}</div>
{{- else -}}
<pre><code class="{{ $class }}">{{- .Inner -}}</code></pre>
{{- end -}}