Skip to content

Commit

Permalink
Refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
sorz committed Aug 25, 2014
1 parent 183ee9b commit 9b23c76
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion asstosrt/__init__.py
Expand Up @@ -78,7 +78,7 @@ def __unicode__(self):
def _preprocess_line(line):
"""Remove line endings and comments."""
line = line.strip()
if line.startswith(';') | line.endswith('{\p0}'):
if line.startswith(';'):
return ''
else:
return line
Expand Down Expand Up @@ -124,6 +124,8 @@ def convert(file, translator=None, no_effect=False, only_first_line=False):
if no_effect:
if dialogue.get('effect', ''):
continue
if dialogue['text'].endswith('{\p0}'): # TODO: Exact match drawing commands.
continue

text = ''.join(_REG_CMD.split(dialogue['text'])) # Remove commands.
text = text.replace(r'\N', '\r\n').replace(r'\n', '\r\n')
Expand Down

0 comments on commit 9b23c76

Please sign in to comment.