Changeset 288 for trunk/lib/Trac.cc


Ignore:
Timestamp:
May 7, 2007, 6:22:33 PM (14 years ago)
Author:
Peter Johansson
Message:

declaring more functions in Trac class. refs #178 and #180.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/Trac.cc

    r287 r288  
    3939    std::string::const_iterator first(str.begin());
    4040    while (first!=str.end()) {
    41       std::string::const_iterator begin(first);
     41      if (log(first, str.end()))
     42        continue;
    4243      if (ticket(first, str.end()))
    4344        continue;
     
    7071  }
    7172
     73
     74  bool Trac::log(std::string::const_iterator& first,
     75                 const std::string::const_iterator& last)
     76  {
     77    if (first==last)
     78      return false;
     79
     80    const std::string::const_iterator first_orig(first);
     81    if (*first != '#')
     82      return false;
     83    ++first;
     84    std::string ticket;
     85    for (;first!=last && isdigit(*first); ++first)
     86      ticket.append(1,*first);
     87
     88    if (ticket.empty())
     89      return false;
     90
     91    Configuration* conf = Configuration::instance();
     92    hs_.stream() << anchor(conf->trac_ticket()+ticket,"#"+ticket);
     93    return true;
     94  }
     95
    7296}} // end of namespace svndigest and namespace theplu
Note: See TracChangeset for help on using the changeset viewer.