109 $ns = $page->getNamespace();
110 $model = $this->namespaceContentModels[$ns] ??
null;
114 $title = $this->titleFactory->newFromPageIdentity( $page );
116 $title = $this->titleFactory->newFromLinkTarget( $page );
119 if ( !$this->hookRunner->onContentHandlerDefaultModelFor( $title, $model ) && $model !==
null ) {
124 $isCodePage = $ns ===
NS_MEDIAWIKI && preg_match(
'!\.(css|js|json)$!u', $title->getText(), $m );
130 $isCodeSubpage = $ns ===
NS_USER
132 && preg_match(
"/\\/.*\\.(js|css|json)$/", $title->getText(), $m );
134 if ( $isCodeSubpage ) {
140 $isWikitext = $isWikitext && !$isCodePage && !$isCodeSubpage;
142 if ( !$isWikitext ) {