Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F467553
PhutilRemarkupItalicRule.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
460 B
Referenced Files
None
Subscribers
None
PhutilRemarkupItalicRule.php
View Options
<?php
final
class
PhutilRemarkupItalicRule
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
(
'<em>%s</em>'
,
$matches
[
1
]);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Tue, May 6, 3:19 AM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
80131
Default Alt Text
PhutilRemarkupItalicRule.php (460 B)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment