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

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

No files matched your search

@@ -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>