null, 'above' => null, 'below' => null, ); $parser = new PhutilSimpleOptions(); $options = $parser->parse($matches[1]) + $options; $uri = id(new PhutilURI('/macro/meme/')) ->alter('macro', $options['src']) ->alter('uppertext', $options['above']) ->alter('lowertext', $options['below']); if ($this->getEngine()->isTextMode()) { $img = ($options['above'] != '' ? "\"{$options['above']}\"\n" : ''). $options['src'].' <'.PhabricatorEnv::getProductionURI($uri).'>'. ($options['below'] != '' ? "\n\"{$options['below']}\"" : ''); } else { $img = phutil_tag( 'img', array( 'src' => (string)$uri, )); } return $this->getEngine()->storeText($img); } }