Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Last revision Both sides next revision
policies:ndc_wiki_syntax [2010-05-20 23:02:56]
garrett.plasky
policies:ndc_wiki_syntax [2010-09-14 20:02:41]
garrett.plasky Approved
Line 5: Line 5:
  
   * %%<q></q>%% blocks are used to highlight text that needs emphasis, similar to a blockquote. Dokuwiki natively supports this by putting two spaces on a blank line before the text, however this does not work when dealing with lists, so we have implemented a workaround.\\ <q>This is what a sample block looks like. **We can even use wiki syntax inside of it.**</q>   * %%<q></q>%% blocks are used to highlight text that needs emphasis, similar to a blockquote. Dokuwiki natively supports this by putting two spaces on a blank line before the text, however this does not work when dealing with lists, so we have implemented a workaround.\\ <q>This is what a sample block looks like. **We can even use wiki syntax inside of it.**</q>
-  * %%<code lang></code>%% blocks are used to provide syntax highlighting for code blocks. Most common languages are recognized by replacing **lang** with the language of the quoted text. There is also a special language definition for console commands, aptly named **console**. Example of Perl syntax highlighting:\\ <code perl>#!/usr/bin/perl+  * Shell command (and output) should be quoted using %%<code console></code>%%, which will render the text monospace in black/white like a console:\\ <code console># test_command 
 +test output</code> 
 +  * %%<sxh lang></sxh>%% blocks are used to provide syntax highlighting for code blocks. Most common languages are recognized by replacing **lang** with the language of the quoted text. Example of Perl syntax highlighting:\\ <sxh perl>#!/usr/bin/perl
  
 use strict; use strict;
Line 12: Line 14:
 print $message; print $message;
 exit(); exit();
-</code>+</sxh>
   * %%<c></c>%% blocks are used to do inline command highlighting. %%<code lang></code>%% are block-level elements and will be forced onto their own line whereas this block can be used inline with other text; particularly useful when referencing a particular shell command mid-sentence. (Nitty gritty: code uses divs, c uses spans.)\\  <q>The text <c>in the middle of this sentence</c> makes use of %%<c></c>%%.</q>   * %%<c></c>%% blocks are used to do inline command highlighting. %%<code lang></code>%% are block-level elements and will be forced onto their own line whereas this block can be used inline with other text; particularly useful when referencing a particular shell command mid-sentence. (Nitty gritty: code uses divs, c uses spans.)\\  <q>The text <c>in the middle of this sentence</c> makes use of %%<c></c>%%.</q>