Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F7450254
HRHandler.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1007 B
Referenced Files
None
Subscribers
None
HRHandler.php
View Options
<?php
declare
(
strict_types
=
1
);
namespace
Wikimedia\Parsoid\Html2Wt\DOMHandlers
;
use
Wikimedia\Parsoid\DOM\Element
;
use
Wikimedia\Parsoid\DOM\Node
;
use
Wikimedia\Parsoid\Html2Wt\SerializerState
;
use
Wikimedia\Parsoid\Utils\DOMDataUtils
;
class
HRHandler
extends
DOMHandler
{
public
function
__construct
()
{
parent
::
__construct
(
false
);
}
/** @inheritDoc */
public
function
handle
(
Element
$node
,
SerializerState
$state
,
bool
$wrapperUnmodified
=
false
):
?
Node
{
$state
->
emitChunk
(
str_repeat
(
'-'
,
4
+
(
DOMDataUtils
::
getDataParsoid
(
$node
)->
extra_dashes
??
0
)
),
$node
);
return
$node
->
nextSibling
;
}
/** @inheritDoc */
public
function
before
(
Element
$node
,
Node
$otherNode
,
SerializerState
$state
):
array
{
return
[
'min'
=>
1
,
'max'
=>
2
];
}
// XXX: Add a newline by default if followed by new/modified content
/** @inheritDoc */
public
function
after
(
Element
$node
,
Node
$otherNode
,
SerializerState
$state
):
array
{
return
[
'min'
=>
0
,
'max'
=>
2
];
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sun, Nov 22, 20:46 (2 d, 4 m ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
db/c4/87556a197b900c6fa76130d21bd9
Default Alt Text
HRHandler.php (1007 B)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment