mirror of
https://github.com/CaiJimmy/hugo-theme-stack.git
synced 2025-04-29 03:53:30 +08:00
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:
parent
2035beb5a0
commit
9f042524a9
@ -13,7 +13,7 @@
|
|||||||
</header>
|
</header>
|
||||||
<code id="codeblock-id-{{ .Ordinal }}" style="display:none;">{{- .Inner -}}</code>
|
<code id="codeblock-id-{{ .Ordinal }}" style="display:none;">{{- .Inner -}}</code>
|
||||||
{{- if transform.CanHighlight $lang -}}
|
{{- if transform.CanHighlight $lang -}}
|
||||||
<div class="{{ $class }}">{{- highlight .Inner $lang -}}</div>
|
<div class="{{ $class }}">{{- highlight .Inner $lang .Options -}}</div>
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
<pre><code class="{{ $class }}">{{- .Inner -}}</code></pre>
|
<pre><code class="{{ $class }}">{{- .Inner -}}</code></pre>
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
Loading…
Reference in New Issue
Block a user