refactor: table wrapper via table render hook

resolve #503
This commit is contained in:
Cell
2025-12-19 12:48:46 +08:00
parent ebfa5ad741
commit c35dce56d0
6 changed files with 75 additions and 21 deletions
@@ -0,0 +1,6 @@
{{- /* 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 . -}}