From: Oleg Broytman Date: Sun, 24 Feb 2008 21:19:19 +0000 (+0000) Subject: Combined two "if"s. X-Git-Tag: v4.5.3~193 X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=51bccd4e33505fdbeb83f819f0a0b8fbb0dc9e1d;p=bookmarks_db.git Combined two "if"s. git-svn-id: file:///home/phd/archive/SVN/bookmarks_db/trunk@183 fdd5c36f-1aea-0310-aeeb-c58d7e2b6c23 --- diff --git a/Robots/parse_html.py b/Robots/parse_html.py index 137ebfa..57f6498 100755 --- a/Robots/parse_html.py +++ b/Robots/parse_html.py @@ -32,9 +32,9 @@ num_entity_re = re.compile("(&#[0-9]+;)") def recode_entities(title, charset): output = [] for part in entity_re.split(title): - if entity_re.match(part): - if part not in ("&", "<", ">", ""e;", " "): - part = entitydefs.get(part[1:-1], part) + if part not in ("&", "<", ">", ""e;", " ") and \ + entity_re.match(part): + part = entitydefs.get(part[1:-1], part) output.append(part) output2 = []