Fix kanji furigana HTML display

rust
Elnu 2 years ago
parent 7bbf0f1fd8
commit aa4408a593

@ -80,7 +80,7 @@
{{- range.text -}}
{{- if reflect.IsMap . -}}
{{- range $kanji, $furigana := . -}}
<a href="https://jisho.org/search/{{- $kanji -}} %23kanji" target="_blank"><ruby>{{- $kanji -}}<rp>(</rp><rt>{{- $furigana -}}</rt><rp>)</rp></ruby></a>
<a href="https://jisho.org/search/{{- $kanji -}} %23kanji" target="_blank"><ruby>{{- $kanji | safeHTML -}}<rp>(</rp><rt>{{- $furigana | safeHTML -}}</rt><rp>)</rp></ruby></a>
{{- end -}}
{{- else -}}
{{- . -}}
@ -115,4 +115,4 @@
{{- define "secondaryFooter" -}}
{{- partial "footer.html" (partial "footers/submissions.html" .) -}}
{{- end -}}
{{- end -}}

Loading…
Cancel
Save