Code Markup is a WordPress plugin that makes it easy to include program code samples in your posts.
Code Markup is a WordPress plugin that makes it easy to include program code samples in your posts. You can even include HTML markup in the code sample; Code Markup magically knows which characters should be displayed as code and which should be rendered as HTML.
The plugin works by escaping most special HTML tags and characters so they display exactly as typed, but leaving certain ones alone so they will render as normal HTML. The default set of allowed tags is the standard formatting tags like em, strong, span and so on. You can control this explicitly, or implicitly by specifying the language of the code block. For example, in a normal code block, <em> will be rendered as emphasised text, but in an HTML code block, <em> will be displayed as <em>.
(I have to use square brackets instead of angle brackets because of the WordPress Extend site formatting.)
Enclose any code inside a <code> block.
Use <code markup="..." lang="..."> to specify appearance of code.
If you want to fine-tune how Code Markup treats your code, use the markup and lang attributes on the code tag to specify how Code Markup should handle it.
The markup attribute overrides the lang attribute.
Separate <code> blocks should be nested within a <pre> block to preserve whitespace.
Requires: 1.5 or higher
Compatible up to: 2.5
Last Updated: 8 years ago
Active Installs: 1,000+
Got something to say? Need help?