Skip to content

Commit

Permalink
correct a mistake
Browse files Browse the repository at this point in the history
  • Loading branch information
asim committed Dec 30, 2024
1 parent 458860a commit ed33a4a
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions hadith/hadith.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,8 @@ func (b *Book) HTML() string {
func (v *Volumes) TOC() string {
var data string

for _, volume := range v.Contents {
for id, book := range volume.Books {
data += fmt.Sprintf(`<div class="chapter"><a href="/hadith/%d">%s</a></div>`, id+1, book.Name)
}
for id, book := range v.Books {
data += fmt.Sprintf(`<div class="chapter"><a href="/hadith/%d">%s</a></div>`, id+1, book.Name)
}

return data
Expand Down

0 comments on commit ed33a4a

Please sign in to comment.