File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -114,7 +114,7 @@ export function parseMBoxMessageIDAndReferences(parsed: IParsedMBox):
114114 const msgIdRegex =
115115 / ^ \s * < ( [ ^ > ] + ) > ( \s * | , ) ( \( [ ^ " ) ] * ( " [ ^ " ] * " ) ? \) \s * | \( [ ^ ) ] * \) $ ) ? ( < .* ) ? $ / ;
116116 for ( const header of parsed . headers ?? [ ] ) {
117- if ( header . key === " In-Reply-To" || header . key === " References" ) {
117+ if ( header . key . match ( / I n - R e p l y - T o | R e f e r e n c e s / i ) ) {
118118 let value : string = header . value . replace ( / [ \r \n ] / g, " " ) ;
119119 while ( value ) {
120120 const match = value . match ( msgIdRegex ) ;
Original file line number Diff line number Diff line change @@ -183,13 +183,16 @@ References: <pull.986.git.1624559401.gitgitgadget@gmail.com>
183183Date: Thu, 24 Feb 2022 12:35:13 -0800
184184In-Reply-To: <CAPMMpogerttWdjGBNxJaqHT4bd3_igDx4_Fxev2eNHqexZ=aLQ@mail.gmail.com>
185185 (Tao Klerks's message of "Thu, 24 Feb 2022 18:52:27 +0100")
186+ In-reply-to: <lowerReply@mail.gmail.com>
187+ (Tao Klerks's message of "Thu, 24 Feb 2022 18:52:27 +0100")
186188Message-ID: <xmqq5yp4knpa.fsf@gitster.g>
187189
188190I can be pursuaded either way.
189191` ;
190192 const parsed = await parseMBox ( mbox ) ;
191193 const { messageID, references } = parseMBoxMessageIDAndReferences ( parsed ) ;
192194 expect ( messageID ) . toEqual ( "xmqq5yp4knpa.fsf@gitster.g" ) ;
193- expect ( references ) . toHaveLength ( 4 ) ;
195+ expect ( references ) . toHaveLength ( 5 ) ;
194196 expect ( references [ 0 ] ) . toEqual ( "pull.986.git.1624559401.gitgitgadget@gmail.com" ) ;
195- } ) ;
197+ expect ( references [ 4 ] ) . toEqual ( "lowerReply@mail.gmail.com" ) ;
198+ } ) ;
You can’t perform that action at this time.
0 commit comments