--- a/trac/tickets.go Tue Aug 18 01:33:03 2020 -0500
+++ b/trac/tickets.go Tue Sep 01 21:09:25 2020 -0500
@@ -182,7 +182,7 @@
comment = italicRegex.ReplaceAllString(comment, "*$1*")
// replace any ticket link references
- comment = ticketLinkRegex.ReplaceAllString(comment, projectID+"-$1$2")
+ //comment = ticketLinkRegex.ReplaceAllString(comment, projectID+"-$1$2") // clean up some custom links
comment = convertLinks(comment)
@@ -330,7 +330,13 @@
if strings.HasPrefix(change.Field, "_comment") {
- text = "*previously edited comment discarded*"
+ discardedComment := "*previously edited comment discarded* " + // Only add the discarded comment text if it hasn't already been + // added to this comment. + if strings.Index(comment.Text, discardedComment) < 0 { + text = discardedComment