parameters: (line)
return_statement: return line.replace('vvvvEscapeSquareBracketvvvv','[')
docstring: Tag all images found
docstring_summary: Tag all images found
docstring_tokens: Tag all images found
function: def parse_images(line):
  	"Tag all images found"
  	while regex['img'].search(line) and TAGS['img'] != '[\a]':
  		txt = regex['img'].search(line).group(1)
  		tag = TAGS['img']
  
  		# If target supports image alignment, here we go
  		if rules['imgalignable']:
  
  			align = get_image_align(line)	      # right
  			align_name = align.capitalize()       # Right
  
  			# The align is a full tag, or part of the image tag (~A~)
  			if TAGS['imgAlign'+align_name]:
  				tag = TAGS['imgAlign'+align_name]
  			else:
  				align_tag = TAGS['_imgAlign'+align_name]
  				tag = regex['_imgAlign'].sub(align_tag, tag, 1)
  
  			# Dirty fix to allow centered solo images
  			if align == 'center' and TARGET in ('html','xhtml'):
  				rest = regex['img'].sub('',line,1)
  				if re.match('^\s+$', rest):
  					tag = "<center>%s</center>" %tag
  
  		if TARGET == 'tex':
  			tag = re.sub(r'\\b',r'\\\\b',tag)
  			txt = txt.replace('_', 'vvvvTexUndervvvv')
  
  		# Ugly hack to avoid infinite loop when target's image tag contains []
  		tag = tag.replace('[', 'vvvvEscapeSquareBracketvvvv')
  
  		line = regex['img'].sub(tag,line,1)
  		line = regex['x'].sub(txt,line,1)
  	return line.replace('vvvvEscapeSquareBracketvvvv','[')
function_tokens: def parse_images ( line ) : while regex [ 'img' ] . search ( line ) and TAGS [ 'img' ] != '[\a]' : txt = regex [ 'img' ] . search ( line ) . group ( 1 ) tag = TAGS [ 'img' ] # If target supports image alignment, here we go if rules [ 'imgalignable' ] : align = get_image_align ( line ) # right align_name = align . capitalize ( ) # Right # The align is a full tag, or part of the image tag (~A~) if TAGS [ 'imgAlign' + align_name ] : tag = TAGS [ 'imgAlign' + align_name ] else : align_tag = TAGS [ '_imgAlign' + align_name ] tag = regex [ '_imgAlign' ] . sub ( align_tag , tag , 1 ) # Dirty fix to allow centered solo images if align == 'center' and TARGET in ( 'html' , 'xhtml' ) : rest = regex [ 'img' ] . sub ( '' , line , 1 ) if re . match ( '^\s+$' , rest ) : tag = "<center>%s</center>" % tag if TARGET == 'tex' : tag = re . sub ( r'\\b' , r'\\\\b' , tag ) txt = txt . replace ( '_' , 'vvvvTexUndervvvv' ) # Ugly hack to avoid infinite loop when target's image tag contains [] tag = tag . replace ( '[' , 'vvvvEscapeSquareBracketvvvv' ) line = regex [ 'img' ] . sub ( tag , line , 1 ) line = regex [ 'x' ] . sub ( txt , line , 1 ) return line . replace ( 'vvvvEscapeSquareBracketvvvv' , '[' )