Esempio n. 1
0
 def test_convert_html_to_markdown_does_not_escape_backward_slash_followed_by_underscore(
         self):
     html = u"\_ one<div>\_ two</div>"
     expected = u"\_ one\n\_ two\n"
     result = utility.convert_html_to_markdown(html)
     self.assertEqual(expected, result)
Esempio n. 2
0
 def test_convert_html_to_markdown_does_not_escape_leading_plus_sign(self):
     html = u"<div>+ aaa</div>"
     expected = u"+ aaa\n"
     result = utility.convert_html_to_markdown(html)
     self.assertEqual(expected, result)
Esempio n. 3
0
 def test_convert_html_to_markdown_does_not_escape_backward_slash(self):
     html = u"<div>`:\`</div>"
     expected = u"`:\`\n"
     result = utility.convert_html_to_markdown(html)
     self.assertEqual(expected, result)
 def test_convert_html_to_markdown_returns_empty_string_when_input_is_empty_string_and_keep_empty_lines_is_true(self):
     html        = u""
     expected    = u""
     result      = utility.convert_html_to_markdown(html, True)
     self.assertEqual(expected, result)
Esempio n. 5
0
 def test_convert_html_to_markdown_returns_empty_string_when_input_is_empty_string_and_keep_empty_lines_is_true(
         self):
     html = u""
     expected = u""
     result = utility.convert_html_to_markdown(html, True)
     self.assertEqual(expected, result)
Esempio n. 6
0
 def test_convert_html_to_markdown_does_not_escape_curly_braces(self):
     html = u"{ and { and } and }"
     expected = u"{ and { and } and }\n"
     result = utility.convert_html_to_markdown(html)
     self.assertEqual(expected, result)
Esempio n. 7
0
 def test_convert_html_to_markdown_does_not_escape_inverted_comma(self):
     html = u"` and<div>`</div>"
     expected = u"` and\n`\n"
     result = utility.convert_html_to_markdown(html)
     self.assertEqual(expected, result)
 def test_convert_html_to_markdown_does_not_escape_curly_braces(self):
     html        = u"{ and { and } and }"
     expected    = u"{ and { and } and }\n"
     result      = utility.convert_html_to_markdown(html)
     self.assertEqual(expected, result)
 def test_convert_html_to_markdown_does_not_escape_curly_braces_in_divs(self):
     html        = u"{ and<div>{ and</div><div>} and }</div>"
     expected    = u"{ and\n{ and\n} and }\n"
     result      = utility.convert_html_to_markdown(html)
     self.assertEqual(expected, result)
 def test_convert_html_to_markdown_does_not_escape_dots(self):
     html        = u"1. one<div>2. two</div>"
     expected    = u"1. one\n2. two\n"
     result      = utility.convert_html_to_markdown(html)
     self.assertEqual(expected, result)
 def test_convert_html_to_markdown_does_not_escape_dots_with_keep_empty_lines(self):
     html        = u"1. one<div>2. two</div>"
     expected    = u"1. one\n\n2. two\n"
     result      = utility.convert_html_to_markdown(html, True)
     self.assertEqual(expected, result)
 def test_convert_html_to_markdown_does_not_escape_backward_slash_followed_by_underscore(self):
     html        = u"\_ one<div>\_ two</div>"
     expected    = u"\_ one\n\_ two\n"
     result      = utility.convert_html_to_markdown(html)
     self.assertEqual(expected, result)
 def test_convert_html_to_markdown_does_not_escape_backward_slash(self):
     html        = u"<div>`:\`</div>"
     expected    = u"`:\`\n"
     result      = utility.convert_html_to_markdown(html)
     self.assertEqual(expected, result)
 def test_convert_html_to_markdown_does_not_escape_leading_plus_sign(self):
     html        = u"<div>+ aaa</div>"
     expected    = u"+ aaa\n"
     result      = utility.convert_html_to_markdown(html)
     self.assertEqual(expected, result)
Esempio n. 15
0
 def test_convert_html_to_markdown_does_not_escape_dots(self):
     html = u"1. one<div>2. two</div>"
     expected = u"1. one\n2. two\n"
     result = utility.convert_html_to_markdown(html)
     self.assertEqual(expected, result)
 def test_convert_html_to_markdown_does_not_escape_inverted_comma(self):
     html        = u"` and<div>`</div>"
     expected    = u"` and\n`\n"
     result      = utility.convert_html_to_markdown(html)
     self.assertEqual(expected, result)
Esempio n. 17
0
 def test_convert_html_to_markdown_does_not_escape_dots_with_keep_empty_lines(
         self):
     html = u"1. one<div>2. two</div>"
     expected = u"1. one\n\n2. two\n"
     result = utility.convert_html_to_markdown(html, True)
     self.assertEqual(expected, result)
 def test_convert_html_to_markdown_does_not_escape_hash_sign(self):
     html        = u"# one<div># two</div>"
     expected    = u"# one\n# two\n"
     result      = utility.convert_html_to_markdown(html)
     self.assertEqual(expected, result)
Esempio n. 19
0
 def test_convert_html_to_markdown_does_not_escape_curly_braces_in_divs(
         self):
     html = u"{ and<div>{ and</div><div>} and }</div>"
     expected = u"{ and\n{ and\n} and }\n"
     result = utility.convert_html_to_markdown(html)
     self.assertEqual(expected, result)
Esempio n. 20
0
 def test_convert_html_to_markdown_returns_empty_string_when_input_is_empty_string(
         self):
     html = u""
     expected = u""
     result = utility.convert_html_to_markdown(html)
     self.assertEqual(expected, result)
Esempio n. 21
0
 def test_convert_html_to_markdown_does_not_escape_hash_sign(self):
     html = u"# one<div># two</div>"
     expected = u"# one\n# two\n"
     result = utility.convert_html_to_markdown(html)
     self.assertEqual(expected, result)
 def test_convert_html_to_markdown_returns_empty_string_when_input_is_empty_string(self):
     html        = u""
     expected    = u""
     result      = utility.convert_html_to_markdown(html)
     self.assertEqual(expected, result)