fix comment

This commit is contained in:
beawkiattisak 2023-10-20 23:51:19 +07:00 committed by Avelino
parent 8e5c9cbaa9
commit 6c7021c279
1 changed files with 5 additions and 4 deletions

View File

@ -5,14 +5,15 @@ import (
"bytes" "bytes"
"errors" "errors"
"fmt" "fmt"
"github.com/avelino/awesome-go/pkg/markdown"
cp "github.com/otiai10/copy"
template2 "html/template" template2 "html/template"
"net/url" "net/url"
"os" "os"
"path/filepath" "path/filepath"
"text/template" "text/template"
"github.com/avelino/awesome-go/pkg/markdown"
cp "github.com/otiai10/copy"
"github.com/PuerkitoBio/goquery" "github.com/PuerkitoBio/goquery"
"github.com/avelino/awesome-go/pkg/slug" "github.com/avelino/awesome-go/pkg/slug"
) )
@ -241,8 +242,8 @@ func extractCategory(doc *goquery.Document, selector string) (*Category, error)
doc.Find(selector).EachWithBreak(func(_ int, selCatHeader *goquery.Selection) bool { doc.Find(selector).EachWithBreak(func(_ int, selCatHeader *goquery.Selection) bool {
selDescr := selCatHeader.NextFiltered("p") selDescr := selCatHeader.NextFiltered("p")
// FIXME: bug. this would select links from all neighboring // FIXME: bug. this would select links from all neighboring
// sub-categories until the next category. To prevent this we should // sub-categories until the next category. To prevent this we should
// find only first ul // find only first ul
ul := selCatHeader.NextFilteredUntil("ul", "h2") ul := selCatHeader.NextFilteredUntil("ul", "h2")
var links []Link var links []Link