[[http://link http://image img]] in markmin
This commit is contained in:
@@ -1 +1 @@
|
||||
Version 2.4.6-stable+timestamp.2013.04.09.15.59.31
|
||||
Version 2.4.6-stable+timestamp.2013.04.09.16.13.21
|
||||
|
||||
@@ -544,7 +544,7 @@ regex_list=re.compile('^(?:(?:(#{1,6})|(?:(\.+|\++|\-+)(\.)?))\s*)?(.*)$')
|
||||
regex_bq_headline=re.compile('^(?:(\.+|\++|\-+)(\.)?\s+)?(-{3}-*)$')
|
||||
regex_tq=re.compile('^(-{3}-*)(?::(?P<c>[a-zA-Z][_a-zA-Z\-\d]*)(?:\[(?P<p>[a-zA-Z][_a-zA-Z\-\d]*)\])?)?$')
|
||||
regex_proto = re.compile(r'(?<!["\w>/=])(?P<p>\w+):(?P<k>\w+://[\w\d\-+=?%&/:.]+)', re.M)
|
||||
regex_auto = re.compile(r'(?<!["\w>/=])(?P<k>\w+://[\w\d\-+_=?%&/:.]+)',re.M)
|
||||
regex_auto = re.compile(r'(?<!["\w>/=])(?P<k>\w+://[\w\d\-+_=?%&/:.,;#]+\w)',re.M)
|
||||
regex_link=re.compile(r'('+LINK+r')|\[\[(?P<s>.+?)\]\]',re.S)
|
||||
regex_link_level2=re.compile(r'^(?P<t>\S.*?)?(?:\s+\[(?P<a>.+?)\])?(?:\s+(?P<k>\S+))?(?:\s+(?P<p>popup))?\s*$',re.S)
|
||||
regex_media_level2=re.compile(r'^(?P<t>\S.*?)?(?:\s+\[(?P<a>.+?)\])?(?:\s+(?P<k>\S+))?\s+(?P<p>img|IMG|left|right|center|video|audio)(?:\s+(?P<w>\d+px))?\s*$',re.S)
|
||||
@@ -1239,13 +1239,26 @@ def render(text,
|
||||
k = escape(k)
|
||||
t = t or ''
|
||||
style = 'width:%s' % w if w else ''
|
||||
title = ' title="%s"' % escape(a).replace(META, DISABLED_META) if a else ''
|
||||
title = escape(a).replace(META, DISABLED_META) if a else ''
|
||||
p_begin = p_end = ''
|
||||
if p == 'center':
|
||||
p_begin = '<p style="text-align:center">'
|
||||
p_end = '</p>'+pp
|
||||
elif p == 'leftblock':
|
||||
p_begin = '<p style="text-align:left">'
|
||||
p_end = '</p>'+pp
|
||||
elif p == 'rightblock':
|
||||
p_begin = '<p style="text-align:right">'
|
||||
p_end = '</p>'+pp
|
||||
elif p in ('left','right'):
|
||||
style = ('float:%s' % p)+(';%s' % style if style else '')
|
||||
if title:
|
||||
if regex_auto.match(title):
|
||||
p_begin = p_begin + '<a href="%s">' % title
|
||||
p_end = '</a>' + p_end
|
||||
title = ''
|
||||
else:
|
||||
title = ' title="%s"' % title
|
||||
if style:
|
||||
style = ' style="%s"' % style
|
||||
if p in ('video','audio'):
|
||||
|
||||
Reference in New Issue
Block a user