Code Markup
Code Markup is a WordPress plugin that makes it easy to include program code samples in your posts.
The facts
- Active installs
- 200+
- Price
- Free
- Last updated
- 14 Apr 2008
- Added
- May 2005
- Requires WP
- 1.5
- Tested up to
- WP 2.5
- Downloads
- 21,587
Our analysis
AI-assistedCode Markup is a WordPress plugin designed to facilitate the inclusion of program code samples in your posts. It allows you to incorporate HTML markup within the code samples, intelligently distinguishing between characters that should be displayed as code and those that should be rendered as HTML.
The plugin works by escaping most special HTML tags and characters while allowing certain tags, such as em and strong, to render normally. Users can specify the appearance of the code and control how it is treated by using attributes, making it suitable for those who need to present code snippets clearly in their content.
Best for: This plugin is suitable for developers or bloggers who need to display code snippets in their WordPress posts.
What it does well
- ✓Allows inclusion of program code samples in posts
- ✓Supports HTML markup within code samples
- ✓Escapes special HTML tags for accurate display
- ✓Offers control over code appearance with attributes
- ✓Free to use from the WordPress.org directory
Where it falls short
- •Last updated in April 2008, which may affect compatibility
- •Tested only up to WordPress 2.5
- •Directory score indicates potential quality issues
Verdict
Code Markup provides a straightforward solution for embedding code samples, but its age and compatibility limitations may be a concern for some users.
From the developer
bennettmcelwee's own description of Code Markup, lightly tidied.
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, will be rendered as emphasised text, but in an HTML code block, will be displayed as .
(I have to use square brackets instead of angle brackets because of the WordPress Extend site formatting.)
USAGE
-
Enclose any code inside a
block. -
Use
to specify appearance of code.- Include any HTML markup you like in the code, for example to add emphasis to certain sections.
- Separate
blocks should be nested within ablock to preserve whitespace.
-
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.
orallows common HTML tags to be rendered, and displays everything else exactly as written.ordisplays content exactly as written, the same as.
-
The markup attribute overrides the lang attribute.
-
Separate
blocks should be nested within ablock to
preserve whitespace.