Changeset 11244
- Timestamp:
- 09/20/2021 11:53:48 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/api.wordpress.org/public_html/dotorg/trac/pr/functions.php
r10728 r11244 329 329 330 330 // Convert Code blocks. 331 $desc = preg_replace( '#```(.+?)```#s', '{{{$1}}}', $desc ); 331 $desc = preg_replace_callback( 332 '#```(?P<format>[a-z]+$)?(?P<code>.+?)```#sm', 333 function( $m ) { 334 return 335 "{{{\n" . 336 ( $m['format'] ? "#!" . trim( $m['format'] ) . "\n" : '' ) . 337 trim( $m['code'] ) . "\n" . 338 "}}}\n"; 339 }, 340 $desc 341 ); 332 342 333 343 // Convert Images (Must happen prior to Links, as the only difference is a preceeding !)
Note: See TracChangeset
for help on using the changeset viewer.