Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2892084
PhutilRemarkupQuotesBlockRule.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Advanced/Developer...
View Handle
View Hovercard
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
Sun, Jan 19, 16:12 (2 w, 6 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1126366
Default Alt Text
PhutilRemarkupQuotesBlockRule.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment