- Timestamp:
- May 8, 2007, 4:28:00 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/Trac.cc
r290 r291 44 44 if (ticket(first, str.end())) 45 45 continue; 46 if (comment(first, str.end())) 47 continue; 46 48 hs_ << *first; 47 49 ++first; 48 50 } 51 } 52 53 54 bool Trac::comment(std::string::const_iterator& first, 55 const std::string::const_iterator& last) 56 { 57 if (first==last) 58 return false; 59 60 const std::string::const_iterator first_orig(first); 61 if (match(first, last, "comment:ticket:").empty()){ 62 first = first_orig; 63 return false; 64 } 65 66 std::string ticket = match(first, last, Digit()); 67 if (ticket.empty() || first == last || *first != ':') { 68 first = first_orig; 69 return false; 70 } 71 ++first; 72 std::string comment = match(first, last, Digit()); 73 if (comment.empty() ) { 74 first = first_orig; 75 return false; 76 } 77 std::string href(Configuration::instance().trac_root()+"ticket/"+ticket+ 78 "#comment:"+comment); 79 std::string str(first_orig, first); 80 hs_.stream() << anchor(href, str); 81 return true; 82 83 84 const Configuration& conf = Configuration::instance(); 85 hs_.stream() << anchor(conf.trac_root()+"ticket/"+ticket,"#"+ticket); 86 return true; 87 49 88 } 50 89 … … 128 167 ++first; 129 168 std::string rev = match(first, last, Digit()); 169 if (rev.empty() ) { 170 first = first_orig; 171 return false; 172 } 130 173 std::string href(Configuration::instance().trac_root()+"log"+node+ 131 174 "?rev="+rev+"&stop_rev="+stop_rev);
Note: See TracChangeset
for help on using the changeset viewer.