bLADE Wiki: Code listing

Making notes containing code listing 

Storing code snippets with your notes 

Text surrounded by [|  |]  will appear as code.

For example:

         [| functionName() |] 

will appear as:

     functionName()

Code lines

  • Single lines of code will have markup applied

For example:

        [| void *functionName*(int myarg) |] 

will appear as:

      void functionName(int myarg)

Code blocks

  • Multi-line blocks of code will not have markup applied

For example:

        [|
        i = i * 3;
        |]

will not interpret the * as bold markup and will appear as:

              i = i * 3;

Tips

Applying markup to a code block

If you want to use markup to format code, you can write it as a series of individual lines:    

    [| *functionName()* |]
    [| _somethingUnderlined();_ |]
    [| partOfALongStringIn=Italics=(); |]

Using a different font

Code listings are generated using <pre> and <code> HTML tags. 

If you don't like the default font style or size used for code listings, then you can change the style of pre and code in the wiki stylesheet and format your code however you like.