code: public function processInlineLink(Text $text)
      {
          if (!$text->contains('[')) {
              return;
          }
  
          /** @noinspection PhpUnusedParameterInspection */
          $text->replace('{
              #(               # wrap whole match in $1
                \[
                  (' . $this->getNestedBrackets() . ')    # link text = $2
                \]
                \(            # literal paren
                  [ \t]*
                  <?(.*?)>?   # href = $3
                  [ \t]*
                  (           # $4
                    ([\'"])   # quote char = $5
                    (.*?)     # Title = $6
                    \4        # matching quote
                  )?          # title is optional
                \)
              #)
          }xs', function (Text $whole, Text $linkText, Text $url, Text $a = null, Text $q = null, Text $title = null) {
              $url->escapeHtml()->replace('/(?<!\\\\)_/', '\\\\_');
              $this->markdown->emit('escape.special_chars', [$url]);
  
              $linkOptions = [
                  'href' => $url->getString(),
              ];
  
              if ($title) {
                  $linkOptions['title'] = $title->replace('/"/', '&quot;')->escapeHtml()->getString();
              }
  
              return $this->getRenderer()->renderLink($linkText, $linkOptions);
          });
      }
docs: Inline-style links: [link text](url "optional title")
  
  @param Text $text