Bump version of wikitext-parser

This commit is contained in:
DataHoarder 2022-02-20 22:12:48 +01:00
parent 7afba40de9
commit e2be7c2d2c
3 changed files with 8 additions and 8 deletions

2
go.mod
View file

@ -4,4 +4,4 @@ go 1.18
require golang.org/x/text v0.3.7
require git.gammaspectra.live/S.O.N.G/wikitext-parser v0.0.0-20220220191916-a0cd37f62668 // indirect
require git.gammaspectra.live/S.O.N.G/wikitext-parser v0.0.0-20220220211024-5c99a0ad20f1

4
go.sum
View file

@ -1,4 +1,4 @@
git.gammaspectra.live/S.O.N.G/wikitext-parser v0.0.0-20220220191916-a0cd37f62668 h1:jPxi+BgG+OByf2Dts5M69OUyYIWOgnDEbaOuDzxDXR0=
git.gammaspectra.live/S.O.N.G/wikitext-parser v0.0.0-20220220191916-a0cd37f62668/go.mod h1:WRXSVczbEaJc+qb8f8C9ZLi4naQl32HS0WK/eccO9Hk=
git.gammaspectra.live/S.O.N.G/wikitext-parser v0.0.0-20220220211024-5c99a0ad20f1 h1:rGG6rV43aQXUYdZUU4J+Qg5e30K6cA2Ga6yGbRztqoo=
git.gammaspectra.live/S.O.N.G/wikitext-parser v0.0.0-20220220211024-5c99a0ad20f1/go.mod h1:WRXSVczbEaJc+qb8f8C9ZLi4naQl32HS0WK/eccO9Hk=
golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk=
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=

View file

@ -107,7 +107,7 @@ type artistEntry struct {
Names []string `json:"names"`
}
func getArtistEntries(kind string, entries []interface{}, opts *wikitext_parser.GetInterfaceSliceStringValueOptions) (artists []artistEntry) {
func getArtistEntries(kind string, entries []interface{}, opts *wikitext_parser.WikiStringValueOptions) (artists []artistEntry) {
artist := artistEntry{
Position: kind,
@ -277,12 +277,12 @@ func getArtistEntries(kind string, entries []interface{}, opts *wikitext_parser.
return
}
func getWikiStringOptions(title string, trim bool) *wikitext_parser.GetInterfaceSliceStringValueOptions {
func getWikiStringOptions(title string, trim bool) *wikitext_parser.WikiStringValueOptions {
opts := &wikitext_parser.GetInterfaceSliceStringValueOptions{}
opts := &wikitext_parser.WikiStringValueOptions{}
opts.Default()
opts.PageName = title
opts.TemplateHandler = func(template *wikitext_parser.Template, opt *wikitext_parser.GetInterfaceSliceStringValueOptions) (result []string) {
opts.TemplateHandler = func(template *wikitext_parser.Template, opt *wikitext_parser.WikiStringValueOptions) (result []string) {
switch strings.ToUpper(template.Name) {
case "H:TITLE":
if val, ok := template.Parameters["0"]; ok && len(val) > 0 {
@ -308,7 +308,7 @@ func getWikiStringOptions(title string, trim bool) *wikitext_parser.GetInterface
return opts
}
func getStringValue(v []interface{}, opt *wikitext_parser.GetInterfaceSliceStringValueOptions) []string {
func getStringValue(v []interface{}, opt *wikitext_parser.WikiStringValueOptions) []string {
return wikitext_parser.GetWikiStringValue(v, opt)
}