Tutorialpedia Code Function
`code() Function – Edit content (add a revision)
`section(title:'Pre-requisites') The Tutorialpedia section is part of the Tutorialpedia Syntax, helping you edit articles: `tutorial(name:'How to understand the Tutorialpedia Tutorial Syntax') `section(title:'What is it for?') The \`code() function allows you to include source code examples inside the tutorials on Tutorialpedia, supporting syntax highlighting for an increasing number of languages. `section(title:'Examples') Including a single line of code: `code(lang:'codepax') {` `code(language:'php' version:'5.2') print 'Hello World!'; `} This will display: `code(language:'php' version:'5.2') print 'Hello World!'; It's also possible to include more than one line, using the `tutorial(name:'Tutorialpedia Text Escape'). `section(title:'Parameters') `section(title:'language') Specifies the language. It must be lowercase. `tutorial(name:'Tutorialpedia Code Function Supported Languages') `section(title:'version') Specifies the language version. `section(title:'nowrap') By default, the code is wrapped to 80 characters width. If the line is longer than 80 characters, a newline character is added before the last word. Sometimes you need to display code which is wider than 80 characters. In this case, add the following parameter to the \`code() call: `code(language:'codepax') nowrap:'1'
Save as new Revision
Syntax docs