On Thu, Sep 4, 2008 at 5:51 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > We've run into an unfortunate behavior or shorten_line. When a commit > message starts with something like "This is in reference to > r123456\n------------------------------------------------", > shorten_line chops off the "r123456" in the revision log view. This > is because when it is looking for word boundaries it searches for > spaces first and only searches for newlines if no spaces are found. > Here is a patch that will make it always find the last whitespace > character. The code could be made a little bit shorter by just > returning the expression directly instead of dropping it in a > temporary variable, but I wasn't sure what the maintainers would > prefer. > > This patch is in the public domain, or under the same license as Trac, > or assigned copyright to Edgewall, or whatever you want. >
Hm, it looks good to me at least. I guess my only comment is that the simplification of everything to one line renders the intermediate assignment to 'shortline' pointless. You should probably put this in a ticket so it doesn't get lost. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Trac Development" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/trac-dev?hl=en -~----------~----~----~----~------~----~------~--~---
