Skip to content

Commit

Permalink
tpl/tplimpl: Fix title attribute in details shortcode
Browse files Browse the repository at this point in the history
  • Loading branch information
jmooring authored Dec 13, 2024
1 parent 852d868 commit a32c889
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tpl/tplimpl/embedded/templates/shortcodes/details.html
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
{{- with $class }} class="{{ . }}" {{- end }}
{{- with $name }} name="{{ . }}" {{- end }}
{{- with $open }} open {{- end }}
{{- with $title }} class="{{ . }}" {{- end -}}
{{- with $title }} title="{{ . }}" {{- end -}}
>
<summary>{{ $summary | .Page.RenderString }}</summary>
{{ .Inner | .Page.RenderString (dict "display" "block") -}}
Expand Down
2 changes: 1 addition & 1 deletion tpl/tplimpl/tplimpl_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -643,7 +643,7 @@ E: An _emphasized_ word.

b.AssertFileContent("public/index.html",
"<details>\n <summary>Details</summary>\n <p>A: An <em>emphasized</em> word.</p>\n</details>",
"<details class=\"my-class\" name=\"my-name\" open class=\"my-title\">\n <summary>A <strong>bold</strong> word</summary>\n <p>B: An <em>emphasized</em> word.</p>\n</details>",
"<details class=\"my-class\" name=\"my-name\" open title=\"my-title\">\n <summary>A <strong>bold</strong> word</summary>\n <p>B: An <em>emphasized</em> word.</p>\n</details>",
"<details>\n <summary>Details</summary>\n <p>C: An <em>emphasized</em> word.</p>\n</details>",
"<details>\n <summary>Details</summary>\n <p>D: An <em>emphasized</em> word.</p>\n</details>",
"<details>\n <summary>Details</summary>\n <p>D: An <em>emphasized</em> word.</p>\n</details>",
Expand Down

0 comments on commit a32c889

Please sign in to comment.