- Timestamp:
- 07/08/2020 03:18:41 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/api.wordpress.org/public_html/dotorg/trac/pr/functions.php
r10000 r10031 291 291 * Formats a PR description for usage on Trac. 292 292 * 293 * This strips out HTML comments and standard boilerplate text. 293 * This: 294 * - Strips HTML comments 295 * - Strips standard boilerplate text 296 * - Converts code blocks 294 297 * 295 298 * @param object $pr_data PR Data. 296 * @return string Stripped downPR Description299 * @return string Converted PR Description 297 300 */ 298 301 function format_pr_desc_for_trac_comment( $pr_data ) { … … 302 305 $desc = preg_replace( '#<!--.+?-->#s', '', $desc ); 303 306 307 // Convert Code blocks. 308 $desc = preg_replace( '#```(.+?)```#s', '{{{$1}}}', $desc ); 309 304 310 // Remove the final line if it matches the specific boilerplate format. 305 311 $desc = preg_replace( "#---\r?\n\*\*.+\*\*$#", '', $desc );
Note: See TracChangeset
for help on using the changeset viewer.