Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F687515
PhutilRemarkupQuotesBlockRule.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
PhutilRemarkupQuotesBlockRule.php
View Options
<?php
final
class
PhutilRemarkupQuotesBlockRule
extends
PhutilRemarkupQuotedBlockRule
{
public
function
getMatchingLineCount
(
array
$lines
,
$cursor
)
{
$pos
=
$cursor
;
if
(
preg_match
(
'/^>/'
,
$lines
[
$pos
]))
{
do
{
++
$pos
;
}
while
(
isset
(
$lines
[
$pos
])
&&
preg_match
(
'/^>/'
,
$lines
[
$pos
]));
}
return
(
$pos
-
$cursor
);
}
public
function
extractChildText
(
$text
)
{
return
array
(
''
,
$this
->
normalizeQuotedBody
(
$text
));
}
public
function
markupText
(
$text
,
$children
)
{
if
(
$this
->
getEngine
()->
isTextMode
())
{
return
$this
->
getQuotedText
(
$children
);
}
$attributes
=
array
();
if
(
$this
->
getEngine
()->
isHTMLMailMode
())
{
$style
=
array
(
'border-left: 3px solid #a7b5bf;'
,
'color: #464c5c;'
,
'font-style: italic;'
,
'margin: 4px 0 12px 0;'
,
'padding: 4px 12px;'
,
'background-color: #f8f9fc;'
,
);
$attributes
[
'style'
]
=
implode
(
' '
,
$style
);
}
return
phutil_tag
(
'blockquote'
,
$attributes
,
$children
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Tue, May 27, 2:38 PM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
173479
Default Alt Text
PhutilRemarkupQuotesBlockRule.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment