src/DataObject.php
protected function replaceReferenceUrls($html)
    {
        return preg_replace_callback('/\[(.*)\]\[(.*)\]/U', function ($found) {
            $key = trim($found[2]);
            $label = trim($found[1]);

            if (empty($key)) {
                $key = $label;
            }

            if (isset($this->references[$key]) === false) {
                return $found[0];
            }

            $reference = $this->getReferenceByKey($key);

            return $this->convertReference($reference, $label);
        }, $html);
    }
protected function replaceReferenceUrls($html)
    {
        return preg_replace_callback('/\[(.*)\]\[(.*)\]/U', function ($found) {
            $key = trim($found[2]);
            $label = trim($found[1]);

            if (empty($key)) {
                $key = $label;
            }

            if (isset($this->references[$key]) === false) {
                return $found[0];
            }

            $reference = $this->getReferenceByKey($key);

            return $this->convertReference($reference, $label);
        }, $html);
    }
@param string $html

@return string