Compose tips
Syntax highlighting of source code can be enabled with the following tags:
- Generic syntax highlighting tags: "
<code>", "<blockcode>". - Language specific syntax highlighting tags: .
- PHP source code can also be enclosed in <?php ... ?> or <% ... %>, but additional options like line numbering are not possible here.
Options and tips:
- The language for the generic syntax highlighting tags can be specified with one of the attribute(s): type, lang, language. The possible values are: "
asp" (for (Unknown Language)), "php" (for (Unknown Language)), "vb" (for (Unknown Language)). - Line numbering can be enabled/disabled with the attribute "linenumbers". Possible values are: "off" for no line numbers, "normal" for normal line numbers and "fancy" for fancy line numbers (every nth line number highlighted). The start line number can be specified with the attribute "start", which implicitly enables normal line numbering. For fancy line numbering the interval for the highlighted line numbers can be specified with the attribute "fancy", which implicitly enables fancy line numbering.
- If the source code between the tags contains a newline (e.g. immediatly after the opening tag), the highlighted source code will be displayed as a code block. Otherwise it will be displayed inline.
- Beside the tag style "
<foo>" it is also possible to use "[foo]".
Defaults:
- Default highlighting mode for generic syntax highlighting tags: when no language attribute is specified, no syntax highlighting will be done.
- Default line numbering: no line numbers.
Examples:
You type You get <code>foo = "bar";</code>Inline code with the default syntax highlighting mode. <code>
foo = "bar";
baz = "foz";
</code>Code block with the default syntax highlighting mode. <code lang="vb" linenumbers="normal">
foo = "bar";
baz = "foz";
</code>Code block with syntax highlighting for (Unknown Language) source code
and normal line numbers.<code language="vb" start="23" fancy="7">
foo = "bar";
baz = "foz";
</code>Code block with syntax highlighting for (Unknown Language) source code,
line numbers starting from 23
and highlighted line numbers every 7th line.- Generic syntax highlighting tags: "
- Quick Tips:
- Two or more spaces at a line's end = Line break
- Double returns = Paragraph
- *Single asterisks* or _single underscores_ = Emphasis
- **Double** or __double__ = Strong
- This is [a link](http://the.link.com "The optional title text")
