refactor: consolidate code block rendering and enhance styling features (#665)

reference issues: #312, #476
This commit is contained in:
Cell
2025-12-19 23:31:18 +08:00
parent 0a614e1763
commit f2b6218edc
12 changed files with 461 additions and 467 deletions
@@ -1,6 +0,0 @@
{{- /* Code wrapper */ -}}
{{- $REin := cond (strings.Contains . `<table class="lntable">`)
`(<table class="lntable">[\s\S]*?<\/table>)`
`(<pre tabindex="0" class="chroma">[\s\S]*?<\/pre>)` -}}
{{- $REout := printf `<div class="code-wrapper">$1</div>` -}}
{{- return replaceRE $REin $REout . -}}