Skip to content

Commit

Permalink
catch both "\r\n" and "\r" cases
Browse files Browse the repository at this point in the history
  • Loading branch information
jf--- committed Mar 31, 2014
1 parent 56b0b6c commit 39a2939
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions enaml/applib/live_editor_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,15 +123,15 @@ def _post_validate_model_text(self, old, new):
This validator replaces CRLF with LF characters.
"""
return new.replace('\r', '\n')
return new.replace('\r\n', '\n').replace('\r', '\n')

def _post_validate_view_text(self, old, new):
""" Post validate the view text.
This validator replaces CRLF with LF characters.
"""
return new.replace('\r', '\n')
return new.replace('\r\n', '\n').replace('\r', '\n')

#--------------------------------------------------------------------------
# Observers
Expand Down

0 comments on commit 39a2939

Please sign in to comment.