Skip to content

Commit

Permalink
Reverted more leniant pagebreak and made synopsis less greedy for #93
Browse files Browse the repository at this point in the history
  • Loading branch information
superlou committed Jan 12, 2020
1 parent 86eb53e commit e3157d3
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions lib/fountain-outline-view.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ class FountainOutlineView extends ScrollView
out.push currentScene
else
break
else if arr[i].match(/^===.*$/)
else if arr[i].match(/^===+$/)
# Advance on page break
i++
else if arr[i].match(/(^EXT\.)|(^INT\.)|(^\.[A-Z]+)|(^\s*=\s*.+)/)
Expand All @@ -206,12 +206,16 @@ class FountainOutlineView extends ScrollView
type: "scene"
hasNote: false
depth: depth
if arr[i].match(/^\s*=\s*/)
synMatched = arr[i].match(/^\s*=\s*(.+)/)

synMatched = arr[i].match(/^=\s*([^\n=].*)/)

if synMatched
currentScene.title = synMatched[1]
currentScene.type = "synopsis"

if arr[i].match(/\[\[[^\]]*\]\]/)
currentScene.hasNote = true

out.push currentScene
i++
else
Expand Down

0 comments on commit e3157d3

Please sign in to comment.