mirror of
https://git.sr.ht/~seirdy/seirdy.one
synced 2024-11-10 00:12:09 +00:00
Add missing tabindex
This commit is contained in:
parent
449a1be659
commit
b02a619260
2 changed files with 5 additions and 5 deletions
|
@ -52,7 +52,7 @@
|
|||
|
||||
|
||||
<!--Since language-figure doesn't seem to work for some reason just use regex to replace it-->
|
||||
{{- $extraLanguageFigure := `<code class="language-figure">` -}}
|
||||
{{- $replacedLanguageFigure := `<code translate="no" itemprop="text">` -}}
|
||||
{{- $extraLanguageFigure := `<pre><code class="language-figure">` -}}
|
||||
{{- $replacedLanguageFigure := `<pre tabindex="0"><code translate="no" itemprop="text">` -}}
|
||||
|
||||
{{- .Content | replaceRE $referencesWithoutHeading $referencesWithHeading | replaceRE $badNoteRef $goodNoteRef | replaceRE $endnotesClosingDiv $endnotesClosingSection | replaceRE $tocHeadingOutside $tocHeadingInside | replaceRE $footnoteBacklinksBad $footnoteBacklinksGood | replaceRE $repeatedFootnoteBacklinksBad $repeatedFootnoteBacklinksGood | replaceRE $endNotesNotFocusable $endNotesFocusable | replaceRE `\’` `’` | replaceRE `\ ` `\ ` | replaceRE `\“` `“` | replaceRE `\”` `”` | replaceRE `\…` `—` | replaceRE `\—` `—` | replaceRE `\­` `\­` | replaceRE `‘` `‘`| safeHTML -}}
|
||||
{{- .Content | replaceRE $referencesWithoutHeading $referencesWithHeading | replaceRE $badNoteRef $goodNoteRef | replaceRE $endnotesClosingDiv $endnotesClosingSection | replaceRE $tocHeadingOutside $tocHeadingInside | replaceRE $footnoteBacklinksBad $footnoteBacklinksGood | replaceRE $repeatedFootnoteBacklinksBad $repeatedFootnoteBacklinksGood | replaceRE $endNotesNotFocusable $endNotesFocusable | replaceRE $extraLanguageFigure $replacedLanguageFigure | replaceRE `\’` `’` | replaceRE `\ ` `\ ` | replaceRE `\“` `“` | replaceRE `\”` `”` | replaceRE `\…` `—` | replaceRE `\—` `—` | replaceRE `\­` `\­` | replaceRE `‘` `‘`| safeHTML -}}
|
||||
|
|
|
@ -28,8 +28,8 @@ sed 7d "$html_file" | xmllint --format --encode UTF-8 --noent - -o "$tmp_file"
|
|||
head -n7 "$tmp_file" >> "$xhtml_file"
|
||||
cat tmp.css >>"$xhtml_file"
|
||||
tail -n +8 "$tmp_file" \
|
||||
| sd '<pre>\n\t*<code ' '<pre><code ' \
|
||||
| sd '(?:\n)</code>\n\t*</pre>' '</code></pre>' >>"$xhtml_file"
|
||||
| sd '<pre(?: tabindex="0")?>\n\t*<code ' '<pre tabindex="0"><code ' \
|
||||
| sd '(?:\n)?</code>\n(?:[\t\s]*)?</pre>' '</code></pre>' >>"$xhtml_file"
|
||||
tail -n +2 "$xhtml_file" > "$html_file"
|
||||
sed -i 5d "$xhtml_file" # busybox sed supports "-i"
|
||||
|
||||
|
|
Loading…
Reference in a new issue