diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2024-11-13 11:07:57 +0100 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2024-11-13 11:07:57 +0100 |
commit | 3477d9fcec39d17f99cbc891e337658e8660f5db (patch) | |
tree | 4b315ea0ec6c804b40815e2a49911c4ef96681fd /docs/content/en/render-hooks | |
parent | e79ee0d5167707d891c80906e71daa098c9e46af (diff) | |
parent | de0df119b504a91c9e1f442b07954f366ffb2932 (diff) | |
download | hugo-3477d9fcec39d17f99cbc891e337658e8660f5db.tar.gz hugo-3477d9fcec39d17f99cbc891e337658e8660f5db.zip |
Merge commit 'de0df119b504a91c9e1f442b07954f366ffb2932'
Diffstat (limited to 'docs/content/en/render-hooks')
-rwxr-xr-x | docs/content/en/render-hooks/passthrough.md | 2 | ||||
-rwxr-xr-x | docs/content/en/render-hooks/tables.md | 12 |
2 files changed, 11 insertions, 3 deletions
diff --git a/docs/content/en/render-hooks/passthrough.md b/docs/content/en/render-hooks/passthrough.md index 3b82116e6..f4b954c24 100755 --- a/docs/content/en/render-hooks/passthrough.md +++ b/docs/content/en/render-hooks/passthrough.md @@ -95,7 +95,7 @@ Hugo populates the `Attributes` map for _block_ passthrough elements. Markdown a ###### Type -(`bool`) The passthrough element type, either `block` or `inline`. +(`string`) The passthrough element type, either `block` or `inline`. ## Example diff --git a/docs/content/en/render-hooks/tables.md b/docs/content/en/render-hooks/tables.md index 41eadad7b..b8a792747 100755 --- a/docs/content/en/render-hooks/tables.md +++ b/docs/content/en/render-hooks/tables.md @@ -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 }} |