mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-09-01 06:41:30 +00:00
Use the new string scanner everywhere
This commit is contained in:
parent
b8ce441453
commit
f42090766a
7 changed files with 8 additions and 12 deletions
|
|
@ -4,7 +4,6 @@ package themes
|
|||
|
||||
import (
|
||||
"archive/zip"
|
||||
"bufio"
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
|
|
@ -241,7 +240,7 @@ func (self *Theme) Settings() (map[string]string, error) {
|
|||
return nil, err
|
||||
}
|
||||
self.settings = make(map[string]string, 64)
|
||||
scanner := bufio.NewScanner(strings.NewReader(code))
|
||||
scanner := utils.NewLineScanner(code)
|
||||
for scanner.Scan() {
|
||||
line := strings.TrimSpace(scanner.Text())
|
||||
if line != "" && line[0] != '#' {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue