diff options
-rw-r--r-- | screenplain/parsers/fountain.py | 2 | ||||
-rw-r--r-- | tests/files/dialogue.fountain | 5 | ||||
-rw-r--r-- | tests/files/dialogue.fountain.fdx | 17 | ||||
-rw-r--r-- | tests/files/dialogue.fountain.html | 2 |
4 files changed, 25 insertions, 1 deletions
diff --git a/screenplain/parsers/fountain.py b/screenplain/parsers/fountain.py index 7fda23d..f48e94c 100644 --- a/screenplain/parsers/fountain.py +++ b/screenplain/parsers/fountain.py @@ -118,7 +118,7 @@ class InputParagraph(object): def _create_dialog(self, character): return Dialog( - parse_emphasis(character), + parse_emphasis(character.strip()), _to_rich(line.strip() for line in self.lines[1:]) ) diff --git a/tests/files/dialogue.fountain b/tests/files/dialogue.fountain new file mode 100644 index 0000000..e4a2ac2 --- /dev/null +++ b/tests/files/dialogue.fountain @@ -0,0 +1,5 @@ +GIRL +Let me tell you something. + + GUY + I don't wanna. diff --git a/tests/files/dialogue.fountain.fdx b/tests/files/dialogue.fountain.fdx new file mode 100644 index 0000000..4953b17 --- /dev/null +++ b/tests/files/dialogue.fountain.fdx @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no" ?> +<FinalDraft DocumentType="Script" Template="No" Version="1"> +<Content> +<Paragraph Type="Character"> +<Text>GIRL</Text> +</Paragraph> +<Paragraph Type="Dialogue"> +<Text>Let me tell you something.</Text> +</Paragraph> +<Paragraph Type="Character"> +<Text>GUY</Text> +</Paragraph> +<Paragraph Type="Dialogue"> +<Text>I don't wanna.</Text> +</Paragraph> +</Content> +</FinalDraft> diff --git a/tests/files/dialogue.fountain.html b/tests/files/dialogue.fountain.html new file mode 100644 index 0000000..9b19719 --- /dev/null +++ b/tests/files/dialogue.fountain.html @@ -0,0 +1,2 @@ +<div class="dialog"><p class="character">GIRL</p><p>Let me tell you something.</p></div> +<div class="dialog"><p class="character">GUY</p><p>I don't wanna.</p></div> |