diff options
-rw-r--r-- | screenplain/export/html.py | 9 | ||||
-rw-r--r-- | tests/files/simple.fountain | 11 | ||||
-rw-r--r-- | tests/files/simple.fountain.fdx | 21 | ||||
-rw-r--r-- | tests/files/simple.fountain.html | 6 |
4 files changed, 39 insertions, 8 deletions
diff --git a/screenplain/export/html.py b/screenplain/export/html.py index b589129..8980ea8 100644 --- a/screenplain/export/html.py +++ b/screenplain/export/html.py @@ -110,10 +110,11 @@ def format_action(para, out): tag = 'div class="action centered"' else: tag = 'div class="action"' - with tags(out, tag): - for line in para.lines: - with tags(out, 'p'): - out.write(to_html(line)) + with tags(out, tag, 'p'): + for number, line in enumerate(para.lines): + if number != 0: + out.write('<br/>') + out.write(to_html(line)) def format_transition(para, out): diff --git a/tests/files/simple.fountain b/tests/files/simple.fountain index 07d488d..7b8fdda 100644 --- a/tests/files/simple.fountain +++ b/tests/files/simple.fountain @@ -1,9 +1,18 @@ EXT. SOMEWHERE - DAY -GUY and GURL walks down the street. +GUY and GURL walk down the street. + +It's a sunny day. +Sunnier than normal. +Too sunny to be funny. GUY So what's up? GURL Nothing much. +Just thinking. +And you? + +GUY +Nothing. diff --git a/tests/files/simple.fountain.fdx b/tests/files/simple.fountain.fdx index 2e56d82..9701f3a 100644 --- a/tests/files/simple.fountain.fdx +++ b/tests/files/simple.fountain.fdx @@ -6,7 +6,14 @@ <Text>EXT. SOMEWHERE - DAY</Text> </Paragraph> <Paragraph Type="Action"> - <Text>GUY and GURL walks down the street.</Text> + <Text>GUY and GURL walk down the street.</Text> + </Paragraph> + <Paragraph Type="Action"> + <Text>It's a sunny day. +</Text> + <Text>Sunnier than normal. +</Text> + <Text>Too sunny to be funny.</Text> </Paragraph> <Paragraph Type="Character"> <Text>GUY</Text> @@ -20,5 +27,17 @@ <Paragraph Type="Dialogue"> <Text>Nothing much.</Text> </Paragraph> + <Paragraph Type="Dialogue"> + <Text>Just thinking.</Text> + </Paragraph> + <Paragraph Type="Dialogue"> + <Text>And you?</Text> + </Paragraph> + <Paragraph Type="Character"> + <Text>GUY</Text> + </Paragraph> + <Paragraph Type="Dialogue"> + <Text>Nothing.</Text> + </Paragraph> </Content> </FinalDraft> diff --git a/tests/files/simple.fountain.html b/tests/files/simple.fountain.html index abcc55a..70043dd 100644 --- a/tests/files/simple.fountain.html +++ b/tests/files/simple.fountain.html @@ -1,4 +1,6 @@ <h6>EXT. SOMEWHERE - DAY</h6> -<div class="action"><p>GUY and GURL walks down the street.</p></div> +<div class="action"><p>GUY and GURL walk down the street.</p></div> +<div class="action"><p>It's a sunny day.<br/>Sunnier than normal.<br/>Too sunny to be funny.</p></div> <div class="dialog"><p class="character">GUY</p><p>So what's up?</p></div> -<div class="dialog"><p class="character">GURL</p><p>Nothing much.</p></div> +<div class="dialog"><p class="character">GURL</p><p>Nothing much.</p><p>Just thinking.</p><p>And you?</p></div> +<div class="dialog"><p class="character">GUY</p><p>Nothing.</p></div> |