Skip to content
  • deuce's avatar
    5710fda8
    Overhaul the wordwrap() function. · 5710fda8
    deuce authored
    The old code unwrapped from the old width and rewrapped to the new width in
    a single pass.  While this was more efficient, it was very difficult to work
    on and understand the code.
    
    Now, wordwrap() is a two pass process.  The first pass unwraps "paragraphs"
    (defined as being the text between two hard CRs) and the second pass wraps
    to the new width.  This makes it simpler to understand and debug.
    
    This fixes some odd wrapping issues when quoting messages.
    5710fda8
    Overhaul the wordwrap() function.
    deuce authored
    The old code unwrapped from the old width and rewrapped to the new width in
    a single pass.  While this was more efficient, it was very difficult to work
    on and understand the code.
    
    Now, wordwrap() is a two pass process.  The first pass unwraps "paragraphs"
    (defined as being the text between two hard CRs) and the second pass wraps
    to the new width.  This makes it simpler to understand and debug.
    
    This fixes some odd wrapping issues when quoting messages.
Loading