Skip to content

Commit

Permalink
Removed replace newline with br and newline from utils.html_format
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikko Korpela committed Aug 13, 2012
1 parent cca859b commit 3c079d1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/robotide/utils/__init__.py
Expand Up @@ -31,7 +31,7 @@


def html_format(text):
return robot.utils.html_format(text).replace('\n', '<br />\n')
return robot.utils.html_format(text)


def name_from_class(item, drop=None):
Expand Down
11 changes: 11 additions & 0 deletions utest/utils/test_htmlformat.py
@@ -0,0 +1,11 @@
import unittest
from robotide import utils

class HTMLFormatTestCase(unittest.TestCase):

def test_formatting(self):
formated = utils.html_format('| foo | bar |\n| zoo | zaa |\n\nhello')
self.assertEqual('<table border="1">\n<tr>\n<td>foo</td>\n<td>bar</td>\n</tr>\n<tr>\n<td>zoo</td>\n<td>zaa</td>\n</tr>\n</table>\n<p>hello</p>', formated)

if __name__ == '__main__':
unittest.main()

0 comments on commit 3c079d1

Please sign in to comment.