diff options
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> | 2016-04-01 03:34:32 +0100 |
---|---|---|
committer | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> | 2016-06-12 15:31:15 +0100 |
commit | fba820e87952461b62cec075432e401ffca1012d (patch) | |
tree | 38c9f11441a430d09bc1346c63737fcb8fc51dcc /poezio/xhtml.py | |
parent | 293d2637d11490e16e5e4d5faf1c60046ef7ead5 (diff) | |
download | poezio-fba820e87952461b62cec075432e401ffca1012d.tar.gz poezio-fba820e87952461b62cec075432e401ffca1012d.tar.bz2 poezio-fba820e87952461b62cec075432e401ffca1012d.tar.xz poezio-fba820e87952461b62cec075432e401ffca1012d.zip |
Convert some genexprs into regular list comprehension.
Diffstat (limited to 'poezio/xhtml.py')
-rw-r--r-- | poezio/xhtml.py | 4 |
1 files changed, 2 insertions, 2 deletions
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'])) |