{"id":54,"date":"2005-06-08T08:51:11","date_gmt":"2005-06-07T22:51:11","guid":{"rendered":"http:\/\/www.thunderguy.com\/semicolon\/2005\/06\/07\/code-markup-wordpress-plugin\/"},"modified":"2005-06-14T14:54:06","modified_gmt":"2005-06-14T04:54:06","slug":"code-markup-wordpress-plugin","status":"publish","type":"post","link":"https:\/\/thunderguy.com\/semicolon\/2005\/06\/08\/code-markup-wordpress-plugin\/","title":{"rendered":"Code Markup: WordPress plugin"},"content":{"rendered":"<p>Code Markup is a <a href=\"http:\/\/wordpress.org\/\">WordPress<\/a> 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.<\/p>\n<p>For example, with Code Markup you can write:<\/p>\n<pre class=\"code\"><code>&lt;pre>\r\n&lt;code>\r\nfor (int i = 0; i &lt; top; ++i) {\r\n   vector&lt;int> &lt;span style=\"color:red\">judy&lt;\/span> = mary();\r\n&lt;\/code>\r\n&lt;\/pre><\/code><\/pre>\n<p>And it will be displayed as<\/p>\n<pre class=\"code\"><code>for (int i = 0; i &lt; top; ++i) {\r\n   vector&lt;int&gt; <span style=\"color:red\">judy<\/span> = mary();<\/code><\/pre>\n<p>with &#8220;judy&#8221; in red, just as you would expect. The <code>&lt;span&gt;<\/code> tag is rendered as normal HTML , but the <code>&lt;int&gt;<\/code> and <code>i &lt; top<\/code> are displayed exactly as typed. This is very useful for times when you want to highlight a particular piece of code in your listing.<\/p>\n<p>Code markup also prevents WordPress from turning your quotes into curly quotes, decrements (<code>--<\/code>) into dashes (&#8211;), and so on.<\/p>\n<p>For details, many examples, download and so on, see the main <a href=\"http:\/\/www.thunderguy.com\/semicolon\/wordpress\/code-markup-wordpress-plugin\/\">Code Markup WordPress plugin<\/a> page.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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. For example, with Code Markup you can write: &lt;pre> [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13],"tags":[83],"class_list":["post-54","post","type-post","status-publish","format-standard","hentry","category-wordpress","tag-wordpress"],"_links":{"self":[{"href":"https:\/\/thunderguy.com\/semicolon\/wp-json\/wp\/v2\/posts\/54","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/thunderguy.com\/semicolon\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/thunderguy.com\/semicolon\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/thunderguy.com\/semicolon\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/thunderguy.com\/semicolon\/wp-json\/wp\/v2\/comments?post=54"}],"version-history":[{"count":0,"href":"https:\/\/thunderguy.com\/semicolon\/wp-json\/wp\/v2\/posts\/54\/revisions"}],"wp:attachment":[{"href":"https:\/\/thunderguy.com\/semicolon\/wp-json\/wp\/v2\/media?parent=54"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/thunderguy.com\/semicolon\/wp-json\/wp\/v2\/categories?post=54"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/thunderguy.com\/semicolon\/wp-json\/wp\/v2\/tags?post=54"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}