function testShouldUseCarriageReturnNewline() { $converter = new JoshRibakoff_Note_RTFToPlainText(); $converter->setNewline("\r\n"); $output = $converter->convert("foo\\parbar"); $this->assertEquals("foo\r\nbar", $output, 'should use \\r\\n as newline'); }
function formatPlaintext($params = array()) { $converter = new JoshRibakoff_Note_RTFToPlainText(); if (isset($params['newline'])) { $converter->setNewline($params['newline']); } return $converter->convert($this->rtf_text); }