Commit dc0ca404 authored by Guido van Rossum's avatar Guido van Rossum

Optimize all start tags with only regular attributes.

parent 09a3e30e
......@@ -147,6 +147,14 @@ class TALGenerator:
if not attrlist:
collect.append("<%s%s" % (name, end))
return 1
new = ["<" + name]
for item in attrlist:
if len(item) > 2:
return 0
new.append(" %s=%s" % (item[0], quote(item[1])))
new.append(end)
collect.extend(new)
return 1
def todoPush(self, todo):
self.todoStack.append(todo)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment