=== Code Markup === Tags: code,markup,format,java,html.xml,c++ Contributors: bennettmcelwee Code Markup is a filter that displays blocks nicely while still allowing formatting. For example, it allows you to write: vector foo(0 And have it displayed as vector foo(0 tag is rendered as normal HTML , but the and will be rendered as emphasised text, but in an HTML code block, will be displayed as . USAGE 1. Enclose any code inside a block. 2. Use to specify appearance of code. allow="none" content will be displayed exactly as written allow="all" content will be rendered as HTML allow="tags" common HTML tags will be rendered as HTML; everything else gets displayed as is allow="default" if lang="html" or "xhtml", same as allow="none"; otherwise as allow="tags" [none] same as allow="default" 3. Separate blocks should be nested within a
 block to
   preserve whitespace.

EXAMPLES

Example: Test strings using s < "foo".
Display: Test strings using s < "foo".

Example: Test strings using s < "foo".
Display: Test strings using s < "foo".
with "s" displayed in bold.

Example:
		
		   

What's going on?

Display:

What's going on?

Example:
		
		   

What's going on?

Display:

What's going on?

With "What's going on?" displayed in bold. Example:
		
		for (int i=0; i<5; ++i) {
		   cout << "smap!" << endl;
		}
		
		
Display:for (int i=0; i<5; ++i) { cout << "smap!" << endl; } with "cout" displayed in red. == Installation == 1. Copy code-markup.php into your WordPress plugins directory (wp-content/plugins). 2. Log in to WordPress Admin. Go to the Plugins page and click Activate for Code Markup. 3. Go to the Options page and click Writing. Make sure "WordPress should correct invalidly nested XHTML automatically" is NOT checked. (Otherwise it may do funny things to your code listings.) == Frequently Asked Questions == = What is this good for? = The plugin allows you to quickly copy and paste code into your blog, and add HTML markup to it to emphasise certain parts of it. Normally this is not possible without a lot of fiddly manual editing. = what tags are allowed by default? = If the code block has its lang attribute set to html or xhtml, then no tags are allowed: all tags are escaped and will display as typed. Otherwise the following tags are allowed: em strong b i ins del a span = How do I change the default behaviour? = To make the code block render as straight HTML, set the code block's "allow" attribute to "all". In this case, make sure that you have typed correct HTML! To make the code block display exactly as typed, set the code block's "allow" attribute to "none". To allow the default tags to be rendered as HTML, even in HTML code, set the code block's "allow" attribute to "tags".