diff options
Diffstat (limited to 'fountain/parse.go')
-rw-r--r-- | fountain/parse.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fountain/parse.go b/fountain/parse.go index 60ea6b5..161a611 100644 --- a/fountain/parse.go +++ b/fountain/parse.go @@ -110,6 +110,12 @@ func Parse(scenes []string, file io.Reader) (out lex.Screenplay) { } toParse = append(toParse, "") // Trigger the backtracking also for the last line for _, row := range toParse { + if titlepage && !strings.Contains(toParse[0], ":") { + out = append(out, lex.Line{Type: "titlepage"}) + out = append(out, lex.Line{Type: "Title", Contents: "Untitled"}) + out = append(out, lex.Line{Type: "newpage"}) + titlepage = false + } row = strings.TrimRight(row, "\n\r") action := "action" if row == "" { |