97 $ns = $page->getNamespace();
98 $model = $this->namespaceContentModels[$ns] ??
null;
102 $title = $this->titleFactory->newFromPageReference( $page );
104 $title = $this->titleFactory->newFromLinkTarget( $page );
107 if ( !$this->hookRunner->onContentHandlerDefaultModelFor( $title, $model ) && $model !==
null ) {
112 $isCodePage = $ns ===
NS_MEDIAWIKI && preg_match(
'!\.(css|js|json|vue)$!u', $title->getText(), $m );
118 $isCodeSubpage = $ns ===
NS_USER
120 && preg_match(
"/\\/.*\\.(js|css|json|vue)$/", $title->getText(), $m );
122 if ( $isCodeSubpage ) {
128 $isWikitext = $isWikitext && !$isCodePage && !$isCodeSubpage;
130 if ( !$isWikitext ) {