1
0
Fork 0
mirror of https://git.sr.ht/~seirdy/seirdy.one synced 2024-09-20 04:12:09 +00:00

Fix tab-selection of <pre> blocks

Turns out some browsers do skip tab-selection of scrollable <pre> blocks
This commit is contained in:
Rohan Kumar 2022-04-07 15:39:06 -07:00
parent 93c394a57b
commit 76a1d8a7ca
No known key found for this signature in database
GPG key ID: 1E892DB2A5F84479

View file

@ -9,10 +9,10 @@
{{ $endnote := `(role="doc-endnote")` }} {{ $endnote := `(role="doc-endnote")` }}
{{ $noEndnote := printf "" }} {{ $noEndnote := printf "" }}
{{ $preWithTabIndex := `<pre tabindex="0">` }}
{{ $preWithoutTabIndex := `<pre>` }} {{ $preWithoutTabIndex := `<pre>` }}
{{ $preWithTabIndex := `<pre tabindex="0">` }}
{{ .Content | replaceRE $references $referencesWithHeading | replaceRE $endnote $noEndnote | replaceRE $preWithTabIndex $preWithoutTabIndex | safeHTML -}} {{ .Content | replaceRE $references $referencesWithHeading | replaceRE $endnote $noEndnote | replaceRE $preWithoutTabIndex $preWithTabIndex | safeHTML -}}
{{ else -}} {{ else -}}
{{ .Content -}} {{ .Content -}}
{{ end -}} {{ end -}}