mirror of
https://github.com/gohugoio/hugoDocs.git
synced 2025-09-15 18:46:41 -04:00
Update table render hook example
See https://github.com/gohugoio/hugo/pull/12889
This commit is contained in:
parent
efbee0bff8
commit
cb3cb504c1
@ -82,7 +82,11 @@ In its default configuration, Hugo renders Markdown tables according to the [Git
|
||||
{{- range .THead }}
|
||||
<tr>
|
||||
{{- range . }}
|
||||
<th {{ printf "style=%q" (printf "text-align: %s" .Alignment) | safeHTMLAttr }}>
|
||||
<th
|
||||
{{- with .Alignment }}
|
||||
{{- printf " style=%q" (printf "text-align: %s" .) | safeHTMLAttr }}
|
||||
{{- end -}}
|
||||
>
|
||||
{{- .Text -}}
|
||||
</th>
|
||||
{{- end }}
|
||||
@ -93,7 +97,11 @@ In its default configuration, Hugo renders Markdown tables according to the [Git
|
||||
{{- range .TBody }}
|
||||
<tr>
|
||||
{{- range . }}
|
||||
<td {{ printf "style=%q" (printf "text-align: %s" .Alignment) | safeHTMLAttr }}>
|
||||
<td
|
||||
{{- with .Alignment }}
|
||||
{{- printf " style=%q" (printf "text-align: %s" .) | safeHTMLAttr }}
|
||||
{{- end -}}
|
||||
>
|
||||
{{- .Text -}}
|
||||
</td>
|
||||
{{- end }}
|
||||
|
Loading…
x
Reference in New Issue
Block a user