changeset 3976:5a2a710367cb

fix string match code better way using 'in' notation
author Byeongweon [tasyblue@gmail.com]
date Wed, 23 Jul 2008 00:14:38 +0900
parents d8771735a6db
children 07d73a42f555
files MoinMoin/converter/text_html_text_moin_wiki.py
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/converter/text_html_text_moin_wiki.py	Tue Jul 22 23:40:38 2008 +0900
+++ b/MoinMoin/converter/text_html_text_moin_wiki.py	Wed Jul 23 00:14:38 2008 +0900
@@ -821,10 +821,10 @@
         node_style = node.getAttribute("style")        
       
         is_strike = node.getAttribute("class") == "strike"
-        is_strike = is_strike or node_style.find("line-through") > -1
-        is_strong = node_style.find("bold") > -1
-        is_italic = node_style.find("italic") > -1
-        is_underline = node_style.find("underline") > -1
+        is_strike = is_strike or "line-through" in node_style
+        is_strong = "bold" in node_style
+        is_italic = "italic" in node_style
+        is_underline = "underline" in node_style
         
         
         if is_strike: