Skip to content

Commit

Permalink
Improve parser's word split - use strings.Fields
Browse files Browse the repository at this point in the history
Fixes #31 .
  • Loading branch information
doronbehar committed Jul 12, 2020
1 parent b41963e commit f4b49de
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion previewer.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func NewPreviewer(filePath, configPath string) (Previewer, error) {
scanner := bufio.NewScanner(file)
scanner.Split(bufio.ScanLines)
for scanner.Scan() {
def := strings.Split(scanner.Text(), " ")
def := strings.Fields(scanner.Text())
match, err := regexp.MatchString(def[0], p.mimeType)
if err != nil {
return p, err
Expand Down

0 comments on commit f4b49de

Please sign in to comment.