diff options
author | Joop Kiefte <ikojba@gmail.com> | 2019-01-01 02:55:59 +0100 |
---|---|---|
committer | Joop Kiefte <ikojba@gmail.com> | 2019-01-01 02:55:59 +0100 |
commit | a596a34d9582311d72825430b8705db50acf6eb1 (patch) | |
tree | 36383f082f659108fc00ba0c851b970f1cbee0c7 /lex/parse.go | |
parent | 9bfc11edbfcbe24fbd462ff9501fb4e036e1ca9b (diff) |
Improving fountain support. Still not perfect, but steadily improving
Diffstat (limited to 'lex/parse.go')
-rw-r--r-- | lex/parse.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lex/parse.go b/lex/parse.go index e105a22..00a6cbd 100644 --- a/lex/parse.go +++ b/lex/parse.go @@ -1,8 +1,8 @@ package lex import ( - "io" "bufio" + "io" "strings" ) @@ -18,9 +18,9 @@ func Parse(file io.Reader) (out Screenplay) { var line Line s, err = f.ReadString('\n') split := strings.SplitN(s, ":", 2) - switch len(split){ - case 0,1: - line.Type = strings.Trim(s,": \n\r") + switch len(split) { + case 0, 1: + line.Type = strings.Trim(s, ": \n\r") case 2: line.Type = split[0] line.Contents = strings.TrimSpace(split[1]) |