mediawiki-extensions-Syntax.../includes/ParsoidExt.php
Isabelle Hurbain-Palatin e4e8f8e076 Set hasWikitextInput flag to false
The content of the SyntaxHighlight extension is not wikitext and
annotations should be stripped from it before rendering.

Bug: T341009
Depends-On: I4e9a7a8bec3cb9532ef8a729fd2c6c4acca5d8a0
Change-Id: Ibada54d517830b1112b59513b090dc4bbdc7c917
2023-10-03 20:52:29 +00:00

42 lines
975 B
PHP

<?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.
'stripNowiki' => true,
'hasWikitextInput' => false,
]
],
[
'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.
'stripNowiki' => true,
'hasWikitextInput' => false,
]
]
]
];
}
}