Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F567969
PhutilRemarkupDelRule.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
467 B
Referenced Files
None
Subscribers
None
PhutilRemarkupDelRule.php
View Options
<?php
final
class
PhutilRemarkupDelRule
extends
PhutilRemarkupRule
{
public
function
getPriority
()
{
return
1000.0
;
}
public
function
apply
(
$text
)
{
if
(
$this
->
getEngine
()->
isTextMode
())
{
return
$text
;
}
return
$this
->
replaceHTML
(
'@(?<!~)~~([^
\s
~].*?~*)~~@s'
,
array
(
$this
,
'applyCallback'
),
$text
);
}
protected
function
applyCallback
(
array
$matches
)
{
return
hsprintf
(
'<del>%s</del>'
,
$matches
[
1
]);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Tue, May 13, 1:09 PM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
116229
Default Alt Text
PhutilRemarkupDelRule.php (467 B)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment