#NEWLINE# def bootstrap_alert( visitor , items ) : #NEWLINE# #INDENT# '\n    Format:\n        \n        [[alert(class=error)]]:\n            message\n    ' #NEWLINE# txt = [ ] #NEWLINE# for x in items : #NEWLINE# #INDENT# cls = x [ 'kwargs' ] . get ( 'class' , '' ) #NEWLINE# if cls : #NEWLINE# #INDENT# cls = ( 'alert-%s' % cls ) #NEWLINE# #UNINDENT# txt . append ( ( '<div class="alert %s">' % items ) ) #NEWLINE# if ( 'close' in x [ 'kwargs' ] ) : #NEWLINE# #INDENT# txt . append ( '<button class="close" data-dismiss="alert">&times;</button>' ) #NEWLINE# #UNINDENT# text = visitor . parse_text ( x [ 'body' ] , 'article' ) #NEWLINE# txt . append ( text ) #NEWLINE# txt . append ( '</div>' ) #NEWLINE# #UNINDENT# return '\n' . join ( txt )