Topic on Project:Support desk

How to disable wikisyntax-based parsing of CSS/JS pages?

4
Bandar Lego (talkcontribs)

Hi! I'm using MediaWiki 1.16.1, PHP Version 5.2.14, MySQL 5.1.49-community server. My question is about why are CSS and especially JS pages (usually stored at MediaWiki namespace) by default previewed and rendered as common wikitext? Currently if I want to properly write down some code containing double square brackets or four tildes (for example) I have to escape the whole page with some like // <nоwiki>. Maybe somebody knows how to edit certain pages in a raw mode or so. Please give me advice.

Bawolff (talkcontribs)

You don't really have to worry about [[. Well its displayed as a link, it should not be a link when used as JS (unless you're using pipe trick). ~~~~ is the only really annoying one. You can do things like '~~' + '~~' if you don't want to use nowiki.

If you install the Extension:SyntaxHighlight GeSHi extension, such pages will display as code instead of wikitext when viewing them (for example like mediawiki:Common.js). However this doesn't stop issues with ~~~~.

Bandar Lego (talkcontribs)

If you install the Extension:SyntaxHighlight GeSHi extension... — already done, but I want to see geshi-highlighted syntax not only on saved page, but on preview as well. Strange, but preview of userJS subpages works more smartly than preview of critical system messages in MW namespace. And also it's strange to see some things like Category:$1 in Special:WantedCategories and User:Cool Javascripter (whose name is credited in JS pages) in Special:MostLinkedPages. That why I'm here. But thank you for your response anyway.

Bawolff (talkcontribs)

Yeah, that is the downside of using mediawiki pages to store js. There's really no way around that that i am aware of.

Reply to "How to disable wikisyntax-based parsing of CSS/JS pages?"