WordPress.org

Making WordPress.org

Changeset 3085


Ignore:
Timestamp:
05/05/2016 11:27:41 AM (5 years ago)
Author:
ocean90
Message:

Slack: In Commit::format_commit_for_slack() match only ASCII numbers which have 1-3 digits.

Introduced in [2703].

See https://wordpress.slack.com/archives/core/p1462134505002817.
See #838.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/common/includes/slack/trac/commit.php

    r2704 r3085  
    6666    static function format_commit_for_slack( Trac $trac, $message ) {
    6767        // Convert ASCII numbers to an UTF-8 character, like ?\226?\128?\148 => — (m-dash).
    68         $message = preg_replace_callback( '/(?:\?\\\\(\d+))/', function( $matches ) {
     68        $message = preg_replace_callback( '/(?:\?\\\\(\d{1,3}))/', function( $matches ) {
    6969            return chr( $matches[1] );
    7070        }, $message );
Note: See TracChangeset for help on using the changeset viewer.