This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | Next revision Both sides next revision | ||
wiki:syntax [2014/09/14 13:08] vedavrata [Syntax Highlighting] |
wiki:syntax [2014/09/14 13:08] vedavrata [Downloadable Code Blocks] |
||
---|---|---|---|
Line 16: | Line 16: | ||
- | |||
- | ==== Downloadable Code Blocks ==== | ||
- | |||
- | When you use the ''%%<code>%%'' or ''%%<file>%%'' syntax as above, you might want to make the shown code available for download as well. You can do this by specifying a file name after language code like this: | ||
- | |||
- | <code> | ||
- | <file php myexample.php> | ||
- | <?php echo "hello world!"; ?> | ||
- | </file> | ||
- | </code> | ||
- | |||
- | <file php myexample.php> | ||
- | <?php echo "hello world!"; ?> | ||
- | </file> | ||
- | |||
- | If you don't want any highlighting but want a downloadable file, specify a dash (''-'') as the language code: ''%%<code - myfile.foo>%%''. | ||