Including Code Snippets Inline

A How-To Recipe
July 2006


An answer to a FAQ may contain a code snippet, or other similar type text, that has character sequences that could be confused as markup instructions. An example would be showing, within the KnowledgeBase, what a specific markup looks like. The box below shows the markup for bold text.

'''three single quote marks make bold'''

The above displays what the text edit window looks like, not what is displayed after the page is generated. Thus, we see a need a way to say to the KnowledgeBase "do not interpret this."


The solution is the code to follow markup of  with  at end of code block as in the block below.

[[Color(red)]] This will not be red [[Endcolor]]
} } }

The bottom three brackets have the spaces removed. The three bracket markup has the effect of preventing the Knowledge base from interpreting the text. Without them, the words "This will not be red" would be, in fact, red.

Univ/CIE/KA/FaQ/CodeContainment (last edited 2015-03-06 18:11:27 by localhost)