Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F92874329
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
Sun, Nov 24, 10:10
Size
512 B
Mime Type
text/x-php
Expires
Tue, Nov 26, 10:10 (1 d, 23 h)
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