PreformattedFormattingRules

Enter a topic name to show or a new topic name to create; then press Enter
Summary
examples of formatting text that is pre-formatted

Also see CodeFormattingRules for output of code examples.

Whitespace Prefix

Any line starting with whitespace becomes preformatted text:

 Public Class MyClass
    Public Sub New()
	DoCoolStuff()
	If IsReallyCool Then
	    DoSomethingEvenMoreCool()
	End If
    End Sub
 End Class
 public class CSharpExample {
    CSharpExample() {
       int n = 5;
       object[] test = new object[n];
    }
 }

Text inside of a PRE block doesn't get hyperlinks automatically added to it.

 
 Here is another '''example.'''

Non-indented preformatted text

It is difficult to cut and paste source files into Wiki and then insert 1 space before every line. The "PRE block" solves this problem. There are 2 usage scenarios: simple syntax and syntax with a key.

Simple Syntax:

{@
your text goes
here and it does not have to start with space or tab
}@

Produces:

your text goes
here and it does not have to start with space or tab

Syntax with key (if for some reason your text contains }@ at the beginning of a line)

{@UniqKey
any text
here including
}@ at line beginning
still inside pre
}@WrongKey
still inside pre
}@UniqKey

Produces:

any text
here including
}@ at line beginning
still inside pre
}@WrongKey
still inside pre

Extended Syntax

For purposes of showing large amounts of code, a lot of developers are used to seeing code presented with color syntax highlighting. To allow for this, you can use the {+ ... }+ syntax and then use the normal FlexWiki FormattingRules to apply styles. For example, this code

 {+
    %blue%public void%% Foo()
    {
	%green%// comment here%%
	%blue%string%% s;
  • ...*
    }
 }+

Would result in this output

   public void Foo()
   {
       // comment here
       string s;
      ...
   }

which will look extremely familiar to all of the Visual Studio developers out there.

Most of the normal FlexWiki processing is done on this text, it just maintains the fixed-width font and the whitespace presentation that is normally associated with the {@ ... }@ FlexWiki tag or the <pre> HTML tag. This processing includes , , , and formatting rules.

Version: 3   Revised: 2013-04-13 19:32:42 Last Updated by: Rename Show Links to Topic