src/Ciconia/Extension/Gfm/InlineStyleExtension.php
public function processMultipleUnderScore(Text $text)
    {
        $text->replace('{<pre>.*?</pre>}m', function (Text $w) {
            $md5 = md5($w);
            $this->hashes[$md5] = $w;

            return "{gfm-extraction-$md5}";
        });

        $text->replace('/^(?! {4}|\t)(\[?\w+_\w+_\w[\w_]*\]?)/', function (Text $w, Text $word) {
            $underscores = $word->split('//')->filter(function (Text $item) {
                return $item == '_';
            });

            if (count($underscores) >= 2) {
                $word->replaceString('_', '\\_');
            }

            return $word;
        });

        /** @noinspection PhpUnusedParameterInspection */
        $text->replace('/\{gfm-extraction-([0-9a-f]{32})\}/m', function (Text $w, Text $md5) {
            return "\n\n" . $this->hashes[(string)$md5];
        });
    }
public function processMultipleUnderScore(Text $text)
    {
        $text->replace('{<pre>.*?</pre>}m', function (Text $w) {
            $md5 = md5($w);
            $this->hashes[$md5] = $w;

            return "{gfm-extraction-$md5}";
        });

        $text->replace('/^(?! {4}|\t)(\[?\w+_\w+_\w[\w_]*\]?)/', function (Text $w, Text $word) {
            $underscores = $word->split('//')->filter(function (Text $item) {
                return $item == '_';
            });

            if (count($underscores) >= 2) {
                $word->replaceString('_', '\\_');
            }

            return $word;
        });

        /** @noinspection PhpUnusedParameterInspection */
        $text->replace('/\{gfm-extraction-([0-9a-f]{32})\}/m', function (Text $w, Text $md5) {
            return "\n\n" . $this->hashes[(string)$md5];
        });
    }
Multiple underscores in words

It is not reasonable to italicize just part of a word, especially when you're dealing with code and names often
appear with multiple underscores. Therefore, GFM ignores multiple underscores in words.

@param Text $text