'h1', 'h2', 'h3', 'h4', 'h5', 'h6',
// Collapsed fields are hidden by default so we don't want them showing up.
'.autocollapse',
+ // Content explicitly decided to be not searchable by editors such
+ // as custom navigation templates.
+ '.navigation-not-searchable'
];
/**
];
/**
- * WikiTextStructure constructor.
* @param ParserOutput $parserOutput
*/
public function __construct( ParserOutput $parserOutput ) {
if ( !is_null( $this->allText ) ) {
return;
}
- $this->parserOutput->setEditSectionTokens( false );
- $this->parserOutput->setTOCEnabled( false );
- $text = $this->parserOutput->getText();
+ $text = $this->parserOutput->getText( [
+ 'enableSectionEditTokens' => false,
+ 'allowTOC' => false,
+ ] );
if ( strlen( $text ) == 0 ) {
$this->allText = "";
// empty text - nothing to seek here