#NEWLINE# def process_content( content , context ) : #NEWLINE# #INDENT# for ( key , value ) in context . items ( ) : #NEWLINE# #INDENT# re_macros = re . compile ( ( '\\{\\{\\s*%s\\s*\\}\\}' % re . escape ( key ) ) ) #NEWLINE# if re_macros . search ( content ) : #NEWLINE# #INDENT# content = re_macros . sub ( value , content ) #NEWLINE# #UNINDENT# #UNINDENT# return content