sebastien/cuisine — Issue #23: text_ensure_line() does not work as described
Author: kolanos
Created: 2011-10-21 17:17:31+00:00
State: open

>>> some_text = "foo"
>>> some_text = text_ensure_line(some_text, "bar")
>>> some_text
'foo\nbar'
>>> some_text = text_ensure_line(some_text, "bar")
>>> some_text
'foo\nbar\nbar'

Am I misusing it? Shouldn't it stop appending "bar" to the end of the text when it finds "bar"?