2022-07-22 22:14:03 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
declare( strict_types = 1 );
|
|
|
|
|
|
|
|
namespace MediaWiki\SyntaxHighlight;
|
|
|
|
|
|
|
|
use Wikimedia\Parsoid\Ext\ExtensionModule;
|
|
|
|
|
|
|
|
class ParsoidExt implements ExtensionModule {
|
|
|
|
|
|
|
|
/** @inheritDoc */
|
|
|
|
public function getConfig(): array {
|
|
|
|
return [
|
|
|
|
'name' => 'SyntaxHighlight',
|
|
|
|
'tags' => [
|
|
|
|
[
|
|
|
|
'name' => 'source',
|
|
|
|
'handler' => SyntaxHighlight::class,
|
|
|
|
'options' => [
|
|
|
|
// Strip nowiki markers from #tag parser-function arguments.
|
|
|
|
// This will be used to resolve T299103.
|
|
|
|
// This is primarily a b/c flag in Parsoid.
|
2023-09-14 15:46:38 +00:00
|
|
|
'stripNowiki' => true,
|
|
|
|
'hasWikitextInput' => false,
|
2022-07-22 22:14:03 +00:00
|
|
|
]
|
|
|
|
],
|
|
|
|
[
|
|
|
|
'name' => 'syntaxhighlight',
|
|
|
|
'handler' => SyntaxHighlight::class,
|
|
|
|
'options' => [
|
|
|
|
// Strip nowiki markers from #tag parser-function arguments.
|
|
|
|
// This will be used to resolve T299103.
|
|
|
|
// This is primarily a b/c flag in Parsoid.
|
2023-09-14 15:46:38 +00:00
|
|
|
'stripNowiki' => true,
|
|
|
|
'hasWikitextInput' => false,
|
2022-07-22 22:14:03 +00:00
|
|
|
]
|
|
|
|
]
|
|
|
|
]
|
|
|
|
];
|
|
|
|
}
|
|
|
|
}
|