@environmentfilter
def do_wordwrap(environment, s, width=79, break_long_words=True, wrapstring=None):
 if (not wrapstring):
  wrapstring = environment.newline_sequence
 import textwrap
 return wrapstring.join(textwrap.wrap(s, width=width, expand_tabs=False, replace_whitespace=False, break_long_words=break_long_words))

@ environmentfilter def do_wordwrap ( environment , s , width = 79 , break_long_words = True , wrapstring = None ) : if ( not wrapstring ) : wrapstring = environment . newline_sequence import textwrap return wrapstring . join ( textwrap . wrap ( s , width = width , expand_tabs = False , replace_whitespace = False , break_long_words = break_long_words ) )
return a copy of the string passed to the filter wrapped after 79 characters .