parameters: (line)
return_statement: return align
docstring: Return the image (first found) align for the given line
docstring_summary: Return the image (first found) align for the given line
docstring_tokens: Return the image ( first found ) align for the given line
function: def get_image_align(line):
  	"Return the image (first found) align for the given line"
  
  	# First clear marks that can mess align detection
  	line = re.sub(SEPARATOR+'$', '', line)	# remove deflist sep
  	line = re.sub('^'+SEPARATOR, '', line)	# remove list sep
  	line = re.sub('^[\t]+'	   , '', line)	# remove quote mark
  
  	# Get image position on the line
  	m = regex['img'].search(line)
  	ini = m.start() ; head = 0
  	end = m.end()	; tail = len(line)
  
  	# The align detection algorithm
  	if   ini == head and end != tail: align = 'left'   # ^img + text$
  	elif ini != head and end == tail: align = 'right'  # ^text + img$
  	else				: align = 'center' # default align
  
  	# Some special cases
  	if BLOCK.isblock('table'): align = 'center'    # ignore when table
  #	if TARGET == 'mgp' and align == 'center': align = 'center'
  
  	return align
function_tokens: def get_image_align ( line ) : # First clear marks that can mess align detection line = re . sub ( SEPARATOR + '$' , '' , line ) # remove deflist sep line = re . sub ( '^' + SEPARATOR , '' , line ) # remove list sep line = re . sub ( '^[\t]+' , '' , line ) # remove quote mark # Get image position on the line m = regex [ 'img' ] . search ( line ) ini = m . start ( ) head = 0 end = m . end ( ) tail = len ( line ) # The align detection algorithm if ini == head and end != tail : align = 'left' # ^img + text$ elif ini != head and end == tail : align = 'right' # ^text + img$ else : align = 'center' # default align # Some special cases if BLOCK . isblock ( 'table' ) : align = 'center' # ignore when table #	if TARGET == 'mgp' and align == 'center': align = 'center' return align