I'm trying to write a wiki page that will show the contents of a text file containing wiki code. I need it to display the raw text without any changes. I've tried using <nowiki>, but that doesn't work. <pre> only works until it sees the </pre> contained in the text file that I'm trying to post.
The file is a bash script that builds a text file to be injected into a locally hosted mediawiki install. I'm trying to document the script within the wiki itself. How can I tell mediawiki to display this text as text, ignore all wiki and html markup?
What fails when you try <nowiki>?
-----Original Message----- I've tried using <nowiki>, but that doesn't work...
On 01/24/11 10:53, Daniel Barrett wrote:
What fails when you try<nowiki>?
-----Original Message----- I've tried using<nowiki>, but that doesn't work...
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Comments in the bash script are being read as a numbered list.
The script builds some sections of preformatted text so those sections are being handled as such instead of displaying the tags.
Line feeds are all messed up since it's a bash shell script.
Special tip: If you put one leading space before the <nowiki>, the linefeeds in your script will be handled correctly. Give it a try:
{one space here}<nowiki> # foo # bar # blat </nowiki>
As a more heavy-handed solution, you could install http://www.mediawiki.org/wiki/Extension:SyntaxHighlight_GeSHi which not only preserves formatting but also highlights your bash keywords.
DanB
-----Original Message----- Comments in the bash script are being read as a numbered list.
The script builds some sections of preformatted text so those sections are being handled as such instead of displaying the tags.
Line feeds are all messed up since it's a bash shell script.
On 01/24/11 11:17, Daniel Barrett wrote:
Special tip: If you put one leading space before the<nowiki>, the linefeeds in your script will be handled correctly. Give it a try:
{one space here}<nowiki> # foo # bar # blat
</nowiki>
That did the trick! Thanks.
mediawiki-l@lists.wikimedia.org