I think it has something to do with both blocks being given the same crayon ID
After numerous tests I have the following two log entries
This first log entry is from an instance where both blocks were converted correctly. I was only able to get it to work a few times, and generally on refreshes after long periods of inactivity (perhaps an IIS caching issue?). Notice how each block is given a unique ID.
[DEBUG] 'init'
[DEBUG] 'the_posts'
[DEBUG] 'capture for id 4 len 2828'
[DEBUG] 'capture adding id 4 , now has len 2842'
[DEBUG] 'add_crayon_id [crayon-51a0552761ebe'
[DEBUG] 'add_crayon_id [crayon-51a055276228e'
[DEBUG] 'capture added id 4 : 2870'
[DEBUG] 'capture ignore for id 4 : 2828 vs 2870'
[WP UPLOAD FUNCTION] array (
'path' => 'C:\\inetpub\\wwwroot\\wordpress/wp-content/uploads/2013/05',
'url' => 'https://dev4/wordpress/wp-content/uploads/2013/05',
'subdir' => '/2013/05',
'basedir' => 'C:\\inetpub\\wwwroot\\wordpress/wp-content/uploads',
'baseurl' => 'https://dev4/wordpress/wp-content/uploads',
'error' => false,
)
[UPLOAD PATH] 'C:/inetpub/wwwroot/wordpress/wp-content/uploads/crayon-syntax-highlighter/'
[DEBUG] 'Setting theme directories'
[DEBUG] '/themes/'
[DEBUG] 'C:/inetpub/wwwroot/wordpress/wp-content/uploads/crayon-syntax-highlighter/themes/'
[DEBUG] 'CAPTURED FOR ID 4'
[DEBUG] 'Setting font directories'
[DEBUG] '/fonts/'
[DEBUG] 'C:/inetpub/wwwroot/wordpress/wp-content/uploads/crayon-syntax-highlighter/fonts/'
[DEBUG] 'capture finished for post id 4 crayon-id 51a0552761ebe atts: 3 code: 1422'
[DEBUG] 'capture finished for post id 4 crayon-id 51a055276228e atts: 3 code: 997'
[DEBUG] 'head'
[DEBUG] 'head: missed enqueue'
[DEBUG] 'head: force enqueue'
[DEBUG] 'enqueue'
[DEBUG] 'the_content'
[DEBUG] 'shortcode'
[DEBUG] 'instance'
[DEBUG] 'the_content: id 4 has UID 51a0552761ebe : 1'
[DEBUG] 'the_content: REPLACED for id 4 from len 436 to 23791'
[DEBUG] 'shortcode'
[DEBUG] 'instance'
[DEBUG] 'the_content: id 4 has UID 51a055276228e : 1'
[DEBUG] 'the_content: REPLACED for id 4 from len 436 to 40341'
[DEBUG] 'the_content'
[DEBUG] 'the_posts'
Compare that to this second log entry, which is an example where only one code block is being processed and the other fails to process. Notice how the crayon ID is now duplicated:
[DEBUG] 'init'
[DEBUG] 'the_posts'
[DEBUG] 'capture for id 4 len 2828'
[DEBUG] 'capture adding id 4 , now has len 2842'
[DEBUG] 'add_crayon_id [crayon-51a055337be8b'
[DEBUG] 'add_crayon_id [crayon-51a055337be8b'
[DEBUG] 'capture added id 4 : 2870'
[DEBUG] 'capture ignore for id 4 : 2828 vs 2870'
[WP UPLOAD FUNCTION] array (
'path' => 'C:\\inetpub\\wwwroot\\wordpress/wp-content/uploads/2013/05',
'url' => 'https://dev4/wordpress/wp-content/uploads/2013/05',
'subdir' => '/2013/05',
'basedir' => 'C:\\inetpub\\wwwroot\\wordpress/wp-content/uploads',
'baseurl' => 'https://dev4/wordpress/wp-content/uploads',
'error' => false,
)
[UPLOAD PATH] 'C:/inetpub/wwwroot/wordpress/wp-content/uploads/crayon-syntax-highlighter/'
[DEBUG] 'Setting theme directories'
[DEBUG] '/themes/'
[DEBUG] 'C:/inetpub/wwwroot/wordpress/wp-content/uploads/crayon-syntax-highlighter/themes/'
[DEBUG] 'CAPTURED FOR ID 4'
[DEBUG] 'Setting font directories'
[DEBUG] '/fonts/'
[DEBUG] 'C:/inetpub/wwwroot/wordpress/wp-content/uploads/crayon-syntax-highlighter/fonts/'
[DEBUG] 'capture finished for post id 4 crayon-id 51a055337be8b atts: 3 code: 1422'
[DEBUG] 'capture finished for post id 4 crayon-id 51a055337be8b atts: 3 code: 997'
[DEBUG] 'head'
[DEBUG] 'head: missed enqueue'
[DEBUG] 'head: force enqueue'
[DEBUG] 'enqueue'
[DEBUG] 'the_content'
[DEBUG] 'shortcode'
[DEBUG] 'instance'
[DEBUG] 'the_content: id 4 has UID 51a055337be8b : 1'
[DEBUG] 'the_content: REPLACED for id 4 from len 436 to 17000'
[DEBUG] 'the_content'
[DEBUG] 'the_posts'