Changeset View
Changeset View
Standalone View
Standalone View
src/applications/macro/markup/PhabricatorMemeRemarkupRule.php
| Show First 20 Lines • Show All 44 Lines • ▼ Show 20 Lines | if ($this->getEngine()->isTextMode()) { | ||||
| ($options['below'] != '' ? "\n\"{$options['below']}\"" : ''); | ($options['below'] != '' ? "\n\"{$options['below']}\"" : ''); | ||||
| } else { | } else { | ||||
| $alt_text = pht( | $alt_text = pht( | ||||
| 'Macro %s: %s %s', | 'Macro %s: %s %s', | ||||
| $options['src'], | $options['src'], | ||||
| $options['above'], | $options['above'], | ||||
| $options['below']); | $options['below']); | ||||
| $img = $this->newTag( | $img = id(new PHUIRemarkupImageView()) | ||||
| 'img', | ->setURI($uri) | ||||
| array( | ->addClass('phabricator-remarkup-macro') | ||||
| 'src' => $uri, | ->setAlt($alt_text); | ||||
| 'alt' => $alt_text, | |||||
| 'class' => 'phabricator-remarkup-macro', | |||||
| )); | |||||
| } | } | ||||
| return $this->getEngine()->storeText($img); | return $this->getEngine()->storeText($img); | ||||
| } | } | ||||
| } | } | ||||