Merge pull request #2656 from ZhenShuo2021/feat/codeblock-title

 Feat: support title in code block
This commit is contained in:
Nuno C.
2025-12-22 17:11:53 +00:00
committed by GitHub
9 changed files with 91 additions and 110 deletions

View File

@@ -0,0 +1,10 @@
{{- $title := or .Attributes.title "" -}}
{{- $lang := or .Type "text" -}}
<div class="highlight-wrapper">
{{- with $title -}}
<div class="codeblock-title">
{{- $title -}}
</div>
{{- end -}}
{{- transform.Highlight .Inner $lang .Options -}}
</div>