Making WordPress.org

Changeset 1080


Ignore:
Timestamp:
12/31/2014 05:48:25 PM (10 years ago)
Author:
nacin
Message:

Slack: Better conversion of Trac code blocks.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/svn.wordpress.org/includes/slack-trac-hooks/comments.php

    r1078 r1080  
    9595        }, $comment );
    9696
    97     // Replace {{{ and }}} with ```
    98     $comment = str_replace( array( '{{{', '}}}' ), '```', $comment );
     97    // Replace {{{ and }}} with ``` or `
     98    $comment = trim( str_replace(
     99        array( "\n{{{\n", "\n}}}\n", '{{{', '}}}' ),
     100        array( "\n```\n", "\n```\n", '`',   '`' ),
     101        "\n$comment\n"
     102    ), "\n" );
    99103
    100104    return $comment;
Note: See TracChangeset for help on using the changeset viewer.