96 $ns = $page->getNamespace();
97 $model = $this->namespaceContentModels[$ns] ??
null;
101 $title = $this->titleFactory->newFromPageIdentity( $page );
103 $title = $this->titleFactory->newFromLinkTarget( $page );
106 if ( !$this->hookRunner->onContentHandlerDefaultModelFor( $title, $model ) && $model !==
null ) {
111 $isCodePage = $ns ===
NS_MEDIAWIKI && preg_match(
'!\.(css|js|json|vue)$!u', $title->getText(), $m );
117 $isCodeSubpage = $ns ===
NS_USER
119 && preg_match(
"/\\/.*\\.(js|css|json|vue)$/", $title->getText(), $m );
121 if ( $isCodeSubpage ) {
127 $isWikitext = $isWikitext && !$isCodePage && !$isCodeSubpage;
129 if ( !$isWikitext ) {