#NEWLINE# @ environmentfilter #NEWLINE# def do_wordwrap( environment , s , width = 79 , break_long_words = True , wrapstring = None ) : #NEWLINE# #INDENT# '\n    Return a copy of the string passed to the filter wrapped after\n    ``79`` characters.  You can override this default using the first\n    parameter.  If you set the second parameter to `false` Jinja will not\n    split words apart if they are longer than `width`. By default, the newlines\n    will be the default newlines for the environment, but this can be changed\n    using the wrapstring keyword argument.\n\n    .. versionadded:: 2.7\n       Added support for the `wrapstring` parameter.\n    ' #NEWLINE# if ( not wrapstring ) : #NEWLINE# #INDENT# wrapstring = environment . newline_sequence #NEWLINE# #UNINDENT# import textwrap #NEWLINE# return wrapstring . join ( textwrap . wrap ( s , width = width , expand_tabs = False , replace_whitespace = False , break_long_words = break_long_words ) )