|
SupportedWikiSyntax
This page demonstrates the supported parser features.
Featured Table of Contents: The TOC is generated from all header entries by adding the <wiki:toc/> tag, which optionally takes a max_depth=N parameter, where N is the maximum header depth to include in the TOC. IntroductionThis page demonstrates the various wiki markup which is working (or believed to be working) in the current parser code. If you view this page using our wiki previewer application, the content should look more or less just like it does when rendered via the Google Code wiki site. The goal is not to achieve 100% compatibility with GoCo, but to have a tool which can be used to provide a reasonably accurate preview of a GoCo-formatted page before committing it to a GoCo-hosted project's source code repository. It "could" be used as the basis of a standalone wiki implementation, but that's not the goal. A good way to get a feel for what this code can and cannot do is to browse your own wiki pages with it: From there you can browse the wiki pages from any Google Code project which has wiki pages in its Subversion repository, and they will be rendered by this code. You can also use it as an editor, including a preview, and then copy/paste the changes back into Google Code when you're happy with them. Or you can see a custom full-fledged wiki site which uses this parser as its main renderer: Inlined Markup"Inlined" markup is stuff like bold and emphasis, which appear on elements spanning only across a single line. Basic MarkupAll of the basic inline markup is supported, as demonstrated throughout this page. Wiki-style LinksWiki-words are not linked by default - only those in [ThisSyntax] or [ThisSyntax label string] are handled. e.g. HomePage gets linked but HomePage does not. Remote URLs are also handled only if they are bracketed (e.g. http://code.google.com/p/v8-juice). The exception to this rule is arbitrary wiki-words with a ! prefix, e.g. !JavaScript. In that case, the ! is elided, as it is in GoCo. Image LinksWithout a link: [http://s11n.net/img/logo/logo.lightblue.jpg]
With a link: [http://s11n.net http://s11n.net/img/logo/logo.lightblue.jpg] Table of ContentsAdd a tag which looks like this to your page to have it generate a table of contents from all headers: <wiki:toc max_depth="4"></wiki:toc> The max_depth value specifies the header levels which should be included in the !ToC. e.g. set it to 1 to include only H1 headers and 2 to also include H2 headers. Block-level MarkupSource code blocksif( (i < 10) && (i > 1) ) {
print("hi, world!");
}Source code highlighting requires third-party support. This parser does not colorize code blocks by itself. It is normally fairly easy to add this to the generated HTML output. See this article for a tutorial describing how to do so. Block QuotesSomeone once said: This sentence will be quoted in the future as the canonical example of a quote that is so important that it should be visually separate from the rest of the text in which it appears. ListsAs of r140, nested lists are supported.
Tables
Horizontal LinesThe HR element is represented by ---- on a line by its own: Blatantly Missing Features
| |||||||||