{"id":19907,"date":"2012-09-13T15:25:04","date_gmt":"2012-09-13T15:25:04","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/wp-markdown-syntaxhighlighter\/"},"modified":"2012-09-17T17:21:39","modified_gmt":"2012-09-17T17:21:39","slug":"wp-markdown-syntaxhighlighter","status":"publish","type":"plugin","link":"https:\/\/pcd.wordpress.org\/plugins\/wp-markdown-syntaxhighlighter\/","author":2840316,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"0.4","stable_tag":"0.4","tested":"3.4.2","requires":"3.1","requires_php":"","requires_plugins":"","header_name":"wp-markdown-syntaxhighlighter","header_author":"Matt Shelton","header_description":"","assets_banners_color":"","last_updated":"2012-09-17 17:21:39","external_support_url":"","external_repository_url":"","donate_link":"http:\/\/www.mattshelton.net","header_plugin_uri":"http:\/\/www.mattshelton.net","header_author_uri":"http:\/\/www.mattshelton.net","rating":0,"author_block_rating":0,"active_installs":10,"downloads":3112,"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.2","0.2.1","0.3","0.3.1","0.4"],"block_files":[],"assets_screenshots":[],"screenshots":[],"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[1214,4608,11272,2207,9662],"plugin_category":[],"plugin_contributors":[91763],"plugin_business_model":[],"class_list":["post-19907","plugin","type-plugin","status-publish","hentry","plugin_tags-code","plugin_tags-markdown","plugin_tags-pre","plugin_tags-syntax","plugin_tags-syntaxhighlighter","plugin_contributors-mattshelton","plugin_committers-mattshelton"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/wp-markdown-syntaxhighlighter.svg","icon_2x":false,"generated":true},"screenshots":[],"raw_content":"<!--section=description-->\n<p>WP-Markdown-SyntaxHighlighter is intended to work with the <a href=\"http:\/\/wordpress.org\/extend\/plugins\/wp-markdown\/\">wp-markdown<\/a> and <a href=\"http:\/\/www.viper007bond.com\/wordpress-plugins\/syntaxhighlighter\/\">SyntaxHighlighter Evolved<\/a> plugins as follows:<\/p>\n\n<ul>\n<li>WP-Markdown can automatically use <a href=\"http:\/\/code.google.com\/p\/google-code-prettify\/\">Prettify.js<\/a> to format code, but if you prefer <a href=\"http:\/\/alexgorbatchev.com\/SyntaxHighlighter\/\">Alex Gorbatchev's SyntaxHighlighter<\/a>, this plugin will re-format the Markdown-formatted code blocks to be properly styled by SyntaxHighlighter directly or SyntaxHighlighter Evolved via plugin.<\/li>\n<li>SyntaxHighlighter Evolved uses SyntaxHighlighter and additional extended functionality to display code blocks in an easily readable manner.<\/li>\n<\/ul>\n\n<p>There are two methods of use:<\/p>\n\n<ol>\n<li>Add a <code>#!<\/code> line to your code example and specify the language (brush) only<\/li>\n<li>Add a <code>#!!<\/code> line to your code example and specify any\/all supported parameters via a JSON object<\/li>\n<\/ol>\n\n<h4>Simple Method<\/h4>\n\n<p>To use, add a <code>#!<\/code> line 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 <code>#!<\/code> is removed, and the code is reformatted as:<\/p>\n\n<pre><code>&lt;pre class=\"brush:ruby; notranslate\" title=\"\"&gt;class One &lt; Two\n  def hello\n    puts \"Hello World!\"\n  end\nend&lt;\/pre&gt;\n<\/code><\/pre>\n\n<h4>Full Method<\/h4>\n\n<p>To use, add a <code>#!!<\/code> line as the first line of your code example, with any of the supported SyntaxHighlighter parameters as a JSON object<\/p>\n\n<pre><code>#!!{\"brush\":\"ruby\",\"toolbar\":\"true\",\"highlight\":\"[2,3,4]\"}\nclass Foo &lt; Bar\n  def hello\n    puts \"Hello World!\"\n  end\nend\n<\/code><\/pre>\n\n<p>The <code>#!!<\/code> is removed, and the parameters are interpreted into a CSS class string as:<\/p>\n\n<pre><code>&lt;pre class=\"brush: ruby; toolbar: true; highlight: [2,3,4]; notranslate\"&gt;class Foo &lt; Bar\n  def hello\n    puts \"Hello World!\"\n  end\nend&lt;\/pre&gt;\n<\/code><\/pre>\n\n<h3>TODO<\/h3>\n\n<ul>\n<li>Consider adding support to toggle 'notranslate'<\/li>\n<\/ul>\n\n<!--section=installation-->\n<ol>\n<li>Upload the <code>wp-markdown-syntaxhighlighter<\/code> folder (and its 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 your chosen <code>#!<\/code> or <code>#!!<\/code> formatting.<\/li>\n<\/ol>\n\n<!--section=changelog-->\n<h4>0.4<\/h4>\n\n<ul>\n<li>Switched from <code>preg_replace()<\/code> to <code>preg_replace_callback<\/code> for ()<\/li>\n<li>Removed some potentially harmful formatting code<\/li>\n<li><em>Hat tip to Richard Cyrus for suggesting these changes<\/em><\/li>\n<\/ul>\n\n<h4>0.3.1<\/h4>\n\n<ul>\n<li>Updated licensing to GPL 2 in order to post in WP plugin directory<\/li>\n<li>Cleaned up some comments, code formatting<\/li>\n<\/ul>\n\n<h4>0.3<\/h4>\n\n<ul>\n<li>Fixed case where both syntaxes could not be used in a single post<\/li>\n<li>Added support for the title parameter (default: empty)<\/li>\n<\/ul>\n\n<h4>0.2.1<\/h4>\n\n<ul>\n<li>Refactored strings to constants<\/li>\n<li>Fixed a typo<\/li>\n<\/ul>\n\n<h4>0.2<\/h4>\n\n<ul>\n<li>Added <code>#!!<\/code> syntax to support extended parameters from JSON string<\/li>\n<li>Added support for the following parameters:\n\n<ul>\n<li>auto-links (default: true)<\/li>\n<li>class-name (default: '')<\/li>\n<li>collapse (default: false)<\/li>\n<li>first-line (default: 1)<\/li>\n<li>gutter (default: true)<\/li>\n<li>highlight (default: null, format is a number or array of numbers)<\/li>\n<li>html-script (default: false)<\/li>\n<li>ruler (default: false)<\/li>\n<li>smart-tabs (default: true)<\/li>\n<li>title (default: null) <strong>NOTE<\/strong>: This does not set the title attribute on the <code>&lt;pre&gt;<\/code> tag yet.<\/li>\n<li>tab-size (default: 4)<\/li>\n<li>toolbar (default: true)<\/li>\n<\/ul><\/li>\n<\/ul>\n\n<h4>0.1<\/h4>\n\n<ul>\n<li>Initial release<\/li>\n<\/ul>","raw_excerpt":"WP-Markdown-SyntaxHighlighter works in conjunction with Markdown-formatted code blocks and SyntaxHighlighter to properly format code.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/19907","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=19907"}],"author":[{"embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/mattshelton"}],"wp:attachment":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=19907"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=19907"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=19907"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=19907"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=19907"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=19907"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}