1
0
mirror of https://github.com/osmarks/mycorrhiza.git synced 2024-12-04 18:19:54 +00:00

History: Generate correct anchors for headings on history pages

This is a prehistoric bug no one cared about
This commit is contained in:
Timur Ismagilov 2022-05-18 20:41:58 +03:00
parent e922af77c1
commit a16304b26f
2 changed files with 2 additions and 2 deletions

View File

@ -26,7 +26,7 @@ WithRevisions returns an html representation of `revs` that is meant to be inser
{% code
currentYear := grp[0].Time.Year()
currentMonth := grp[0].Time.Month()
sectionId := fmt.Sprintf("%d-%d", currentYear, currentMonth)
sectionId := fmt.Sprintf("%04d-%02d", currentYear, currentMonth)
%}
<section class="history__month">
<a href="#{%s sectionId %}" class="history__month-anchor">

View File

@ -156,7 +156,7 @@ func StreamWithRevisions(qw422016 *qt422016.Writer, hyphaName string, revs []Rev
//line history/view.qtpl:27
currentYear := grp[0].Time.Year()
currentMonth := grp[0].Time.Month()
sectionId := fmt.Sprintf("%d-%d", currentYear, currentMonth)
sectionId := fmt.Sprintf("%04d-%02d", currentYear, currentMonth)
//line history/view.qtpl:30
qw422016.N().S(`