Page MenuHomePhabricator

PhutilRemarkupBoldRule.php
No OneTemporary

PhutilRemarkupBoldRule.php

<?php
final class PhutilRemarkupBoldRule extends PhutilRemarkupRule {
public function getPriority() {
return 1000.0;
}
public function apply($text) {
if ($this->getEngine()->isTextMode()) {
return $text;
}
return $this->replaceHTML(
'@\\*\\*(.+?)\\*\\*@s',
array($this, 'applyCallback'),
$text);
}
protected function applyCallback(array $matches) {
return hsprintf('<strong>%s</strong>', $matches[1]);
}
}

File Metadata

Mime Type
text/x-php
Expires
Tue, Dec 24, 5:45 PM (1 d, 18 h)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6902882
Default Alt Text
PhutilRemarkupBoldRule.php (468 B)

Event Timeline