Changeset 11245
- Timestamp:
- 09/21/2021 12:22:16 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/api.wordpress.org/public_html/dotorg/trac/pr/functions.php
r11244 r11245 330 330 // Convert Code blocks. 331 331 $desc = preg_replace_callback( 332 '# ```(?P<format>[a-z]+$)?(?P<code>.+?)```#sm',332 '#^(?P<indent>[ >]*)```(?P<format>[a-z]+$)(?P<code>.+?)```$#sm', 333 333 function( $m ) { 334 334 return 335 "{{{\n" .336 ( $m['format'] ? "#!" . trim( $m['format'] ) . "\n" : '' ).335 $m['indent'] . "{{{\n" . 336 $m['indent'] . "#!" . trim( $m['format'] ) . "\n" . 337 337 trim( $m['code'] ) . "\n" . 338 "}}}\n";338 $m['indent'] . "}}}\n"; 339 339 }, 340 340 $desc 341 341 ); 342 342 343 $desc = preg_replace( '#```(.+?)```#s', '{{{$1}}}', $desc ); 344 343 345 // Convert Images (Must happen prior to Links, as the only difference is a preceeding !) 344 346 $desc = preg_replace( '#!\[(.+?)\]\(https?://(.+?)\)#', '[[Image(https://i0.wp.com/$2)]]', $desc );
Note: See TracChangeset
for help on using the changeset viewer.