diff options
-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 }) |