diff options
author | Martin Czygan <martin.czygan@gmail.com> | 2021-07-09 21:16:21 +0200 |
---|---|---|
committer | Martin Czygan <martin.czygan@gmail.com> | 2021-07-09 21:16:21 +0200 |
commit | 6bc75d77b688fef72760485ad27a1baa6157bfe9 (patch) | |
tree | e834388e24dd360f1544aa74288a5a3bea515e19 /skate | |
parent | 0406b312fc27582f4cc54b2005330e4929b73b90 (diff) | |
download | refcat-6bc75d77b688fef72760485ad27a1baa6157bfe9.tar.gz refcat-6bc75d77b688fef72760485ad27a1baa6157bfe9.zip |
wiki: try a bit more cleanup
Diffstat (limited to 'skate')
-rw-r--r-- | skate/cmd/skate-wikipedia-doi/main.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/skate/cmd/skate-wikipedia-doi/main.go b/skate/cmd/skate-wikipedia-doi/main.go index 07de520..be3be0a 100644 --- a/skate/cmd/skate-wikipedia-doi/main.go +++ b/skate/cmd/skate-wikipedia-doi/main.go @@ -31,7 +31,11 @@ func main() { if ids.DOI == "" || !skate.PatDOI.MatchString(ids.DOI) { return nil, nil } - s := fmt.Sprintf("%s\t%s\t%s", ids.DOI, strings.TrimSpace(w.PageTitle), string(p)) + var ( + doi = strings.TrimSpace(ids.DOI) + pageTitle = strings.TrimSpace(w.PageTitle) + s = fmt.Sprintf("%s\t%s\t%s", doi, pageTitle, string(p)) + ) return []byte(s), nil }) |