src/Converter.php
public function wrap(
        $text,
        $innerHtml = null,
        $prefix = '<span class="emoji" data-emoji-code=":code:">',
        $postfix = '</span>'
    )
    {
        $wrappedText = preg_replace_callback(
            $this->getPlaceholderPattern(),
            function ($match) use ($innerHtml, $prefix, $postfix) {
                list($placeholder, $code) = $match;
                list($pre, $post) = str_replace(':code:', $code, [$prefix, $postfix]);

                return $pre . ($innerHtml ?: $placeholder) . $post;
            },
            $text
        );

        return $wrappedText;
    }
public function wrap(
        $text,
        $innerHtml = null,
        $prefix = '<span class="emoji" data-emoji-code=":code:">',
        $postfix = '</span>'
    )
    {
        $wrappedText = preg_replace_callback(
            $this->getPlaceholderPattern(),
            function ($match) use ($innerHtml, $prefix, $postfix) {
                list($placeholder, $code) = $match;
                list($pre, $post) = str_replace(':code:', $code, [$prefix, $postfix]);

                return $pre . ($innerHtml ?: $placeholder) . $post;
            },
            $text
        );

        return $wrappedText;
    }
public function wrap ( $ text , $ innerHtml = null , $ prefix = '<span class="emoji" data-emoji-code=":code:">' , $ postfix = '</span>' ) { $ wrappedText = preg_replace_callback ( $ this -> getPlaceholderPattern ( ) , function ( $ match ) use ( $ innerHtml , $ prefix , $ postfix ) { list ( $ placeholder , $ code ) = $ match ; list ( $ pre , $ post ) = str_replace ( ':code:' , $ code , [ $ prefix , $ postfix ] ) ; return $ pre . ( $ innerHtml ? : $ placeholder ) . $ post ; } , $ text ) ; return $ wrappedText ; }
@inheritdoc

By default wraps with span tags with class 'emoji', overridable via
$prefix and $postfix variables. Optionally replaces the placeholder
between pre- and postfix with the given innerHtml string (e.g.
&nbsp; could be a good choice for that).
@inheritdoc