Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 7 |
|
0.00% |
0 / 2 |
CRAP | |
0.00% |
0 / 1 |
RawHTML | |
0.00% |
0 / 7 |
|
0.00% |
0 / 2 |
6 | |
0.00% |
0 / 1 |
sourceToDom | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getConfig | |
0.00% |
0 / 6 |
|
0.00% |
0 / 1 |
2 |
1 | <?php |
2 | declare( strict_types = 1 ); |
3 | |
4 | namespace Wikimedia\Parsoid\ParserTests; |
5 | |
6 | use Wikimedia\Parsoid\DOM\DocumentFragment; |
7 | use Wikimedia\Parsoid\Ext\ExtensionModule; |
8 | use Wikimedia\Parsoid\Ext\ExtensionTagHandler; |
9 | use Wikimedia\Parsoid\Ext\ParsoidExtensionAPI; |
10 | |
11 | class RawHTML extends ExtensionTagHandler implements ExtensionModule { |
12 | /** @inheritDoc */ |
13 | public function sourceToDom( |
14 | ParsoidExtensionAPI $extApi, string $content, array $args |
15 | ): DocumentFragment { |
16 | return $extApi->htmlToDom( $content ); |
17 | } |
18 | |
19 | /** @inheritDoc */ |
20 | public function getConfig(): array { |
21 | return [ |
22 | 'name' => 'RawHTML', |
23 | 'tags' => [ |
24 | [ 'name' => 'html', 'handler' => self::class ], |
25 | ], |
26 | ]; |
27 | } |
28 | } |