From fba820e87952461b62cec075432e401ffca1012d Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Fri, 1 Apr 2016 03:34:32 +0100 Subject: Convert some genexprs into regular list comprehension. --- poezio/xhtml.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'poezio/xhtml.py') diff --git a/poezio/xhtml.py b/poezio/xhtml.py index b84ce943..ef2334fb 100644 --- a/poezio/xhtml.py +++ b/poezio/xhtml.py @@ -396,8 +396,8 @@ class XHTMLHandler(sax.ContentHandler): if name == 'a': self.pop_formatting() # do not display the link twice - text_elements = filter(lambda x: not x.startswith('\x19'), - self.builder[self.a_start:]) + text_elements = [x for x in self.builder[self.a_start:] + if not x.startswith('\x19')] link_text = ''.join(text_elements).strip() if 'href' in attrs and attrs['href'] != link_text: builder.append(' (%s)' % trim(attrs['href'])) -- cgit v1.2.3