Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F92767869
PhutilRemarkupEngineRemarkupQuotesBlockRule.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sat, Nov 23, 13:42
Size
512 B
Mime Type
text/x-php
Expires
Mon, Nov 25, 13:42 (2 d)
Engine
blob
Format
Raw Data
Handle
22508993
Attached To
rPHU libphutil
PhutilRemarkupEngineRemarkupQuotesBlockRule.php
View Options
<?php
/**
* @group markup
*/
final
class
PhutilRemarkupEngineRemarkupQuotesBlockRule
extends
PhutilRemarkupEngineBlockRule
{
public
function
getBlockPattern
()
{
return
"/^>/"
;
}
public
function
shouldMergeBlocks
()
{
return
false
;
}
public
function
markupText
(
$text
)
{
$lines
=
array
();
foreach
(
explode
(
"
\n
"
,
$text
)
as
$line
)
{
$lines
[]
=
$this
->
applyRules
(
preg_replace
(
'/^>/'
,
''
,
$line
));
}
return
'<blockquote>'
.
implode
(
'<br />'
,
$lines
).
'</blockquote>'
;
}
}
Event Timeline
Log In to Comment