Page MenuHomePhorge

PhutilRemarkupBoldRule.php
No OneTemporary

Size
547 B
Referenced Files
None
Subscribers
None

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) {
if ($this->getEngine()->isAnchorMode()) {
return $matches[1];
}
return hsprintf('<strong>%s</strong>', $matches[1]);
}
}

File Metadata

Mime Type
text/x-php
Expires
Mon, May 12, 1:45 PM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
122965
Default Alt Text
PhutilRemarkupBoldRule.php (547 B)

Event Timeline