pu = parse_update(_build_payload("<span>0490499</span>"), 4999, "")
self.assertIsNone(pu.number)
self.assertTrue(pu.count_attempt)
+
+ def test_html_handling(self):
+ pu = parse_update(_build_payload("123<hr>,456"), None, "")
+ self.assertEqual(pu.number, 123)
out[-1].append(el)
elif el is SPACE:
out[-1].append(el)
- elif el is NEW_LINE or el.name == "br":
+ elif el is NEW_LINE or el.name in ["br", "hr"]:
if out[-1]:
out.append([])
elif el.name in ["em", "strong", "del", "span", "sup", "code", "a", "th", "td"]: