grim/youtrack-import

Parents 32f4ce286b50
Children cdadae07e61c
Tweak the replying to regex to work if someone top posts as well as if they delete the line break after the replying to. Fixes YI-34
--- a/trac/tickets.go Mon Aug 03 23:52:42 2020 -0500
+++ b/trac/tickets.go Tue Aug 04 00:09:24 2020 -0500
@@ -95,7 +95,7 @@
// trac comments that are replies specify usernames which we can't/don't
// want to put in our resulting comments.
- commentReplyingRegex = regexp.MustCompile(`^(?:(?:\> )*Replying to (?:[^]]+)\]:\r\n)+`)
+ commentReplyingRegex = regexp.MustCompile(`(^|\r\n)(?:(?:\> )*Replying to (?:[^]]+)\]:(\r\n)?)+`)
// trac's comments use {{{ and }}} for code blocks. We need to convert them.
// Also, you can have a code block in a block quote which is why we have