{"id":19447,"date":"2012-08-13T22:16:16","date_gmt":"2012-08-13T22:16:16","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/wp-markdown-syntax-sugar\/"},"modified":"2013-01-03T22:06:52","modified_gmt":"2013-01-03T22:06:52","slug":"wp-markdown-syntax-sugar","status":"publish","type":"plugin","link":"https:\/\/pcd.wordpress.org\/plugins\/wp-markdown-syntax-sugar\/","author":7715869,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"0.1.1","stable_tag":"0.1.1","tested":"3.5.2","requires":"3.1","requires_php":"","requires_plugins":"","header_name":"wp-markdown-syntax-sugar","header_author":"Damien White (Visoft, Inc.)","header_description":"","assets_banners_color":"","last_updated":"2013-01-03 22:06:52","external_support_url":"","external_repository_url":"","donate_link":"http:\/\/www.visoftinc.com\/","header_plugin_uri":"https:\/\/github.com\/visoft\/wp-markdown-syntax-sugar","header_author_uri":"http:\/\/www.visoftinc.com","rating":0,"author_block_rating":0,"active_installs":10,"downloads":1955,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","changelog"],"tags":[],"upgrade_notice":[],"ratings":{"1":0,"2":0,"3":0,"4":0,"5":0},"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["0.1.0","0.1.1"],"block_files":[],"assets_screenshots":[],"screenshots":[],"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[1214,32776,4608,11272,2207],"plugin_category":[],"plugin_contributors":[93193],"plugin_business_model":[],"class_list":["post-19447","plugin","type-plugin","status-publish","hentry","plugin_tags-code","plugin_tags-highlight-js","plugin_tags-markdown","plugin_tags-pre","plugin_tags-syntax","plugin_contributors-dwhitevisoft","plugin_committers-dwhitevisoft"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/wp-markdown-syntax-sugar.svg","icon_2x":false,"generated":true},"screenshots":[],"raw_content":"<!--section=description-->\n<p>WP Markdown Syntax Sugar work in conjunction with plugins such as <a href=\"http:\/\/wordpress.org\/extend\/plugins\/wp-markdown\/\">wp-markdown<\/a>\nand <a href=\"http:\/\/wordpress.org\/extend\/plugins\/wp-highlightjs\/\">wp-highlight.js<\/a>. Markdown is fantastic markup for easily\nwriting blogs, and <a href=\"http:\/\/softwaremaniacs.org\/soft\/highlight\/en\/\">highlight.js<\/a> is an extremely easy way to highlight\ncode examples. In most cases, highlight.js automatically detects the proper language for a block of code. In certain\ncases, primarily if your code example is short, highlight.js could improperly detect the language that you are using;\nthat is where this plugin comes into play. By adding one line to your code blocks, you can explicitly set the language\nthat you are using, allowing highlight.js to properly format your code.<\/p>\n\n<p>The concept is inspired by the <a href=\"https:\/\/github.com\/spjwebster\/wp-markdown-syntax-highlight\">wp-markdown-syntax-highlight<\/a>\nplugin.<\/p>\n\n<p>The usage is extremely simple. Just add a shebang as the first line of your code example with the language you are using.<\/p>\n\n<pre><code>#!ruby\nclass Foo &lt; Bar\n  def hello\n    puts \"Hello World!\"\n  end\nend\n<\/code><\/pre>\n\n<p>The shebang is removed, and the code is outputted as:<\/p>\n\n<pre><code>&lt;pre&gt;&lt;code class=\"language-ruby\"&gt;class Foo &lt; Bar\n  def hello\n    puts \"Hello World!\"\n  end\nend&lt;\/code&gt;&lt;\/pre&gt;\n<\/code><\/pre>\n\n<p>Now the code block is properly formatted for highlight.js to do its magic, and the code snippet will be properly\nhighlighted.<\/p>\n\n<!--section=installation-->\n<p>Installation is standard and straight forward.<\/p>\n\n<ol>\n<li>Upload the <code>wp-markdown-syntax-sugar<\/code> folder (and all it's contents) to the <code>\/wp-content\/plugins\/<\/code> directory<\/li>\n<li>Activate the plugin through the 'Plugins' menu in WordPress<\/li>\n<li>Modify improperly formatted code blocks with a shebang.<\/li>\n<\/ol>\n\n<!--section=changelog-->\n<h4>0.1.0<\/h4>\n\n<ul>\n<li>Initial release<\/li>\n<\/ul>\n\n<h4>0.1.1<\/h4>\n\n<ul>\n<li>Modified output to use the HTML5 recommended syntax highlighting class names, e.g. <code>language-ruby<\/code>. For more information, see <a href=\"http:\/\/www.w3.org\/html\/wg\/drafts\/html\/master\/text-level-semantics.html#the-code-element\">the HTML5 spec<\/a><\/li>\n<\/ul>","raw_excerpt":"WP Markdown Syntax Sugar is a simple plugin that works in conjunction with Markdown code blocks and highlight.js to properly format code.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/19447","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=19447"}],"author":[{"embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/dwhitevisoft"}],"wp:attachment":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=19447"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=19447"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=19447"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=19447"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=19447"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=19447"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}