From 94330922eb49afa6f367073cacdb4000cb8edf8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damir=20Jeli=C4=87?= Date: Wed, 8 Aug 2018 20:42:16 +0200 Subject: [PATCH] colors: Handle the

tag. --- matrix/colors.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/matrix/colors.py b/matrix/colors.py index 18a2809..dec9cab 100644 --- a/matrix/colors.py +++ b/matrix/colors.py @@ -389,6 +389,12 @@ class MatrixHtmlParser(HTMLParser): self._toggle_attribute("strikethrough") elif tag == "blockquote": self._toggle_attribute("quote") + elif tag == "p": + if self.text: + self.add_substring(self.text, self.attributes.copy()) + self.text = "\n" + self.add_substring(self.text, DEFAULT_ATRIBUTES.copy()) + self.text = "" elif tag == "font": if self.text: self.add_substring(self.text, self.attributes.copy())