@@ -33,11 +33,11 @@ module.exports = async ({github, context}) => {
3333
3434 // Regex for finding images (simple variant) 
3535 const REGEX_USER_CONTENT_IMAGE_LOOKUP = / \! \[ ( [ ^ \] ] * ) \] \( ( h t t p s : \/ \/ [ - a - z 0 - 9 ] + \. g i t h u b u s e r c o n t e n t \. c o m \/ \d + \/ [ - 0 - 9 a - f ] { 32 , 512 } \. ( j p g | g i f | p n g ) ) \) / gm;
36- const REGEX_ASSETS_IMAGE_LOCKUP = / \! \[ ( [ ^ \] ] * ) \] \( ( h t t p s : \/ \/ g i t h u b \. c o m \/ [ - \w \d ] + \/ [ - \w \d ] + \/ a s s e t s \/ \d + \/ [ \- 0 - 9 a - f ] { 32 , 512 } ) \) / gm;
36+ const REGEX_ASSETS_IMAGE_LOOKUP = / \! \[ ( [ ^ \] ] * ) \] \( ( h t t p s : \/ \/ g i t h u b \. c o m \/ (?: u s e r - a t t a c h m e n t s \/ a s s e t s | [ - \w \d ] + \/ [ - \w \d ] + \/ a s s e t s \/ \d + ) \/ [ \- 0 - 9 a - f ] { 32 , 512 } ) \) / gm;
3737
3838 // Check if we found something
3939 let foundSimpleImages = REGEX_USER_CONTENT_IMAGE_LOOKUP . test ( initialBody )
40- || REGEX_ASSETS_IMAGE_LOCKUP . test ( initialBody ) ;
40+ || REGEX_ASSETS_IMAGE_LOOKUP . test ( initialBody ) ;
4141 if ( ! foundSimpleImages ) {
4242 console . log ( 'Found no simple images to process' ) ;
4343 return ;
@@ -52,7 +52,7 @@ module.exports = async ({github, context}) => {
5252
5353 // Try to find and replace the images with minimized ones
5454 let newBody = await replaceAsync ( initialBody , REGEX_USER_CONTENT_IMAGE_LOOKUP , minimizeAsync ) ;
55- newBody = await replaceAsync ( newBody , REGEX_ASSETS_IMAGE_LOCKUP , minimizeAsync ) ;
55+ newBody = await replaceAsync ( newBody , REGEX_ASSETS_IMAGE_LOOKUP , minimizeAsync ) ;
5656
5757 if ( ! wasMatchModified ) {
5858 console . log ( 'Nothing was modified. Skipping update' ) ;
0 commit comments