Permalink
Browse files

Added new contributor to README

  • Loading branch information...
1 parent 13d2789 commit 3d10dc9a801e867487eabe9f63172a3e693a5aaf @rstacruz committed Nov 27, 2009
Showing with 19 additions and 15 deletions.
  1. +1 −0 README.md
  2. +18 −15 TextMate/Sparkup.tmbundle/Support/sparkup.py
View
@@ -40,6 +40,7 @@ This project is inspired by [Zen Coding](http://code.google.com/p/zen-coding/) o
The following people have contributed code to the project:
- Guillermo O. Freschi (Tordek @ github)
+ - Eric Van Dewoestine (ervandew @ github)
Examples
--------
@@ -844,6 +844,24 @@ def _init_element(self):
elif (name == ''): self.name = 'div'
else: self.name = name
+ # Look for attributes
+ attribs = []
+ for attrib in re.findall('\[([^\]]*)\]', self.str):
+ attribs.append(attrib)
+ self.str = self.str.replace("[" + attrib + "]", "")
+ if len(attribs) > 0:
+ for attrib in attribs:
+ try: key, value = attrib.split('=', 1)
+ except: key, value = [attrib, '']
+ self.attributes[key] = value
+
+ # Try looking for text
+ text = None
+ for text in re.findall('\{([^\}]*)\}', self.str):
+ self.str = self.str.replace("{" + text + "}", "")
+ if text is not None:
+ self.text = text
+
# Get the class names
classes = []
for classname in re.findall('\.([\$a-zA-Z0-9_\-\&]+)', self.str):
@@ -866,21 +884,6 @@ def _init_element(self):
if multiplier is not None:
self.multiplier = int(multiplier)
- # Look for attributes
- attribs = []
- for attrib in re.findall('\[([^\]]*)\]', self.str): attribs.append(attrib)
- if len(attribs) > 0:
- for attrib in attribs:
- try: key, value = attrib.split('=', 1)
- except: key, value = [attrib, '']
- self.attributes[key] = value
-
- # Try looking for text
- text = None
- for text in re.findall('\{([^\}]*)\}', self.str): pass
- if text is not None:
- self.text = text
-
# Populate flag (e.g., ul+)
flags = None
for flags in re.findall('[\+\!]+$', self.str): pass

0 comments on commit 3d10dc9

Please sign in to comment.