Permalink
Browse files

Fixed Issue 2: Multiples Attributes not working

Signed-off-by: Guillermo O. Freschi <tordek@tordek.com.ar>
  • Loading branch information...
1 parent d588654 commit 9d50c591506370819ffd9b425a63536270a508da Guillermo O. Freschi committed Dec 3, 2009
Showing with 6 additions and 6 deletions.
  1. +2 −2 sparkup
  2. +4 −4 sparkup-unittest.py
View
@@ -852,8 +852,8 @@ class Token:
if len(attribs) > 0:
for attrib in attribs:
try: key, value = attrib.split('=', 1)
- except: key, value = [attrib, '']
- self.attributes[key] = value
+ except: key, value = attrib, ''
+ self.attributes[key] = value
# Try looking for text
text = None
View
@@ -35,10 +35,10 @@ class SparkupTest:
'input': 'div#id.class[style=color:blue]',
'output': '<div style="color:blue" class="class" id="id">$1</div><!-- /#id -->$0'
},
- #'Multiple attributes test': {
- # 'input': 'div[align=center][style=color:blue][rel=none]',
- # 'output': '<div style="color:blue" class="class" id="id">$1</div><!-- /#id -->$0'
- # },
+ 'Multiple attributes test': {
+ 'input': 'div[align=center][style=color:blue][rel=none]',
+ 'output': '<div align="center" style="color:blue" rel="none">$1</div>$0'
+ },
'Multiple class test': {
'input': 'div.c1.c2.c3',
'output': '<div class="c1 c2 c3">$1</div><!-- /.c1.c2.c3 -->$0'

0 comments on commit 9d50c59

Please sign in to comment.