aboutsummaryrefslogtreecommitdiffstats
path: root/markdown
diff options
context:
space:
mode:
authorWaylan Limberg <waylan@gmail.com>2008-12-08 11:44:36 -0500
committerWaylan Limberg <waylan@gmail.com>2008-12-08 11:44:36 -0500
commitaf38181495451e303364fab833d04c702ab05abe (patch)
tree1adcdd7cef7aa87930bb37e00f5313e3464e04fc /markdown
parent64523ed5dc8a8da889b93ca9e6dae8ae6ffe5d91 (diff)
downloadmarkdown-af38181495451e303364fab833d04c702ab05abe.tar.gz
markdown-af38181495451e303364fab833d04c702ab05abe.tar.bz2
markdown-af38181495451e303364fab833d04c702ab05abe.zip
Fixed attribute creation to remove newlines and associated misc/uche test. Apparently differant versions of ElementTree encode line breaks in attributes differantly. Therefore, we just remove any such linebreaks as they are insignificant anyway.
Diffstat (limited to 'markdown')
-rw-r--r--markdown/inlinepatterns.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/markdown/inlinepatterns.py b/markdown/inlinepatterns.py
index d666d6d..89fa3b2 100644
--- a/markdown/inlinepatterns.py
+++ b/markdown/inlinepatterns.py
@@ -104,7 +104,7 @@ ATTR_RE = re.compile("\{@([^\}]*)=([^\}]*)}") # {@id=123}
def handleAttributes(text, parent):
"""Set values of an element based on attribute definitions ({@id=123})."""
def attributeCallback(match):
- parent.set(match.group(1), match.group(2))
+ parent.set(match.group(1), match.group(2).replace('\n', ' '))
return ATTR_RE.sub(attributeCallback, text)