{"id":12179,"date":"2011-02-16T16:35:14","date_gmt":"2011-02-16T16:35:14","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/prettify-gc-syntax-highlighter\/"},"modified":"2012-08-28T17:59:24","modified_gmt":"2012-08-28T17:59:24","slug":"prettify-gc-syntax-highlighter","status":"publish","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/prettify-gc-syntax-highlighter\/","author":7625424,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.6.0","stable_tag":"1.6.0","tested":"3.4.2","requires":"3.0.5","requires_php":"","requires_plugins":"","header_name":"Prettify GC Syntax Highlighter","header_author":"Aleksey Nikiforov (lex)","header_description":"","assets_banners_color":"","last_updated":"2012-08-28 17:59:24","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"http:\/\/www.simplex3d.org\/uncategorized\/prettify-gc-syntax-highlighter\/","header_author_uri":"http:\/\/www.simplex3d.org","rating":4.3,"author_block_rating":0,"active_installs":20,"downloads":8603,"num_ratings":3,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","changelog"],"tags":[],"upgrade_notice":{"1.6.0":"<p>Fixed WP warning messages.<\/p>","1.5.1":"<p>Easier to use with shortcodes. Minor bug fixes.<\/p>","1.4":"<p>A new option to highlight one or serveral lines of code.<\/p>","1.3.1":"<p>Improved documentation.<\/p>","1.2":"<p>Upgrade to the new version for overflow support and line numbering.<\/p>"},"ratings":{"1":0,"2":0,"3":"1","4":0,"5":"2"},"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.2","1.3.1","1.4","1.5.1","1.6.0"],"block_files":[],"assets_screenshots":{"screenshot-2.png":{"filename":"screenshot-2.png","revision":"1566911","resolution":"2","location":"plugin"},"screenshot-1.png":{"filename":"screenshot-1.png","revision":"1566911","resolution":"1","location":"plugin"}},"screenshots":{"1":"How to use and a short example.","2":"A larger example with line numbers."},"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[4258,18603,50949,7526],"plugin_category":[],"plugin_contributors":[],"plugin_business_model":[],"class_list":["post-12179","plugin","type-plugin","status-publish","hentry","plugin_tags-google-code","plugin_tags-prettify","plugin_tags-prettify-js","plugin_tags-syntax-highlighter","plugin_committers-lexn"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/prettify-gc-syntax-highlighter.svg","icon_2x":false,"generated":true},"screenshots":[{"src":"https:\/\/ps.w.org\/prettify-gc-syntax-highlighter\/trunk\/screenshot-1.png?rev=1566911","caption":"How to use and a short example."},{"src":"https:\/\/ps.w.org\/prettify-gc-syntax-highlighter\/trunk\/screenshot-2.png?rev=1566911","caption":"A larger example with line numbers."}],"raw_content":"<!--section=description-->\n<p>This plugin has prettify.js copied directly from google-code source browser. So your code will look exactly like it does on google-code.\nCSS is slightly modified to embolden keywords and types.<\/p>\n\n<h3>License<\/h3>\n\n<p>See prettify.js for license details (Apache License 2.0). Other files are available under GPLv2.<\/p>\n\n<h3>Usage<\/h3>\n\n<p>&lt;pre class=&quot;prettyprint&quot;&gt;\n  \/\/ Put your code here.\n&lt;\/pre&gt;<\/p>\n\n<p>Or with shortcode:<\/p>\n\n<p>[code]\n  \/\/ Put your code here.\n[\/code]<\/p>\n\n<h3>Making Code HTML Safe<\/h3>\n\n<p>The plugin automatically makes highlighted code html-safe:<\/p>\n\n<p>&lt;pre class=&quot;prettyprint&quot;&gt;\n  Anything that goes here will be quoted to appear on the page as-is.\n  For example: &lt;head&gt;&lt;\/head&gt;&lt;body&gt;&lt;\/body&gt;\n&lt;\/pre&gt;<\/p>\n\n<p>To avoid quoting your code, add <strong>dontquote<\/strong> as the first class.<\/p>\n\n<p>&lt;pre class=&quot;dontquote prettyprint&quot;&gt;\n  Remember to quote manually.\n  For example: &amp;lt;head&amp;gt;&amp;lt;\/head&amp;gt;&amp;lt;body&amp;gt;&amp;lt;\/body&amp;gt;\n&lt;\/pre&gt;<\/p>\n\n<h3>Line Numbering<\/h3>\n\n<p>Line numbdering can be enabled as follows:<\/p>\n\n<p>&lt;pre class=&quot;prettyprint linenums&quot;&gt;\n  \/\/ Put your code here.\n&lt;\/pre&gt;<\/p>\n\n<p>If you want to start with a line number 42, you can do the following:<\/p>\n\n<p>&lt;pre class=&quot;prettyprint linenums:42&quot;&gt;\n  \/\/ Put your code here.\n&lt;\/pre&gt;<\/p>\n\n<h3>Highlighting Lines<\/h3>\n\n<p>When line numbering is enabled you can highlight one or several lines of code using the highlight class:<\/p>\n\n<p>&lt;pre class=&quot;prettyprint lang-YOURLANG linenums highlight:2,4&quot;&gt;\n  \/\/ line 2\n  \/\/ line 3\n  \/\/ line 4\n&lt;\/pre&gt;<\/p>\n\n<p>Alternatively you can highlight one or several code segments:<\/p>\n\n<p>&lt;pre class=&quot;prettyprint lang-YOURLANG linenums highlight:1-3,5-6&quot;&gt;\n  \/\/ line 2\n  \/\/ line 3\n  \/\/ line 4\n  \/\/ line 5\n&lt;\/pre&gt;<\/p>\n\n<p>Note: This feature is not available when line numbering is disabled.<\/p>\n\n<h3>Specifying Language<\/h3>\n\n<p>Most of the time the highlighter will do a good job guessing how to highlight the code. However, to achieve the best result, you should specify the language:<\/p>\n\n<p>&lt;pre class=&quot;prettyprint lang-YOURLANG&quot;&gt;\n  \/\/ Put your code here.\n&lt;\/pre&gt;<\/p>\n\n<p>Replace YOURLANG with one of the following:<\/p>\n\n<ul>\n<li>aea<\/li>\n<li>agc<\/li>\n<li>apollo<\/li>\n<li>bsh<\/li>\n<li>c<\/li>\n<li>cc<\/li>\n<li>cl<\/li>\n<li>cpp<\/li>\n<li>cs<\/li>\n<li>csh<\/li>\n<li>css-str<\/li>\n<li>cv<\/li>\n<li>cxx<\/li>\n<li>cyc<\/li>\n<li>default-markup<\/li>\n<li>el<\/li>\n<li>fs<\/li>\n<li>go<\/li>\n<li>hs<\/li>\n<li>htm<\/li>\n<li>html<\/li>\n<li>java<\/li>\n<li>js<\/li>\n<li>json<\/li>\n<li>lisp<\/li>\n<li>lua<\/li>\n<li>m<\/li>\n<li>ml<\/li>\n<li>mxml<\/li>\n<li>perl<\/li>\n<li>pl<\/li>\n<li>pm<\/li>\n<li>proto<\/li>\n<li>py<\/li>\n<li>rb<\/li>\n<li>scala<\/li>\n<li>scm<\/li>\n<li>sh<\/li>\n<li>sql<\/li>\n<li>vhd<\/li>\n<li>vhdl<\/li>\n<li>wiki<\/li>\n<li>xhtml<\/li>\n<li>xml<\/li>\n<li>xsl<\/li>\n<li>yaml<\/li>\n<li>yml<\/li>\n<\/ul>\n\n<h3>Shortcode<\/h3>\n\n<p>Here is a quick example. All the parameters are optional.<\/p>\n\n<p>[code lang=\"scala\" start=\"1\" highlight=\"1-3,6,10-14\" background=\"#C0FFB3\"]\n  \/\/ Put your code here.\n[\/code]<\/p>\n\n<p>Html quoting can be disabled as follows:<\/p>\n\n<p>[code quote=\"false\"]\n  \/\/ Put your code here.\n[\/code]<\/p>\n\n<p>The contents of shortcodes is auto-formatted by WP. As a result &lt;p&gt; and &lt;br\/&gt; tags along\nwith some formatting will be lost. If you need to preseve the original formatting use\nhtml notation instead of the shortcode.<\/p>\n\n<h3>Please Support<\/h3>\n\n<p>If you like Prettify GC Syntax Highlighter plugin, please donate a minute of your time and vote for it. Thank you!<\/p>\n\n<!--section=installation-->\n<p>You can use the WordPress plugin installer:<\/p>\n\n<ol>\n<li>Go to: WpAdim -&gt; Plugins -&gt; Add New -&gt; Upload.<\/li>\n<li>Simply upload the zip file and then click 'Activate'.<\/li>\n<\/ol>\n\n<p>Or you can install the plugin manually:<\/p>\n\n<ol>\n<li>Upload the content of the zip file to the <code>\/wp-content\/plugins\/<\/code> directory.<\/li>\n<li>Then activate the plugin through the 'Plugins' menu in WordPress.<\/li>\n<\/ol>\n\n<!--section=changelog-->\n<h4>1.6.0<\/h4>\n\n<ul>\n<li>Fixed \"wp_register_style was called incorrectly\" warnings.<\/li>\n<\/ul>\n\n<h4>1.5.1<\/h4>\n\n<ul>\n<li>Fixed line highlight indices when using linenums.<\/li>\n<li>Added shortcodes.<\/li>\n<\/ul>\n\n<h4>1.4<\/h4>\n\n<ul>\n<li>Added an option to highlight one or serveral lines of code.<\/li>\n<\/ul>\n\n<h4>1.3.1<\/h4>\n\n<ul>\n<li>Updated the language list.<\/li>\n<li>Improved documentation.<\/li>\n<\/ul>\n\n<h4>1.2<\/h4>\n\n<ul>\n<li>Improved htlm-friendly quote filter.<\/li>\n<li>Added line numbering support.<\/li>\n<li>Added overflow support.<\/li>\n<\/ul>\n\n<h4>1.1<\/h4>\n\n<ul>\n<li>The first public version.<\/li>\n<\/ul>","raw_excerpt":"Your code will look exactly like it does on google-code.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/12179","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=12179"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/lexn"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=12179"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=12179"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=12179"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=12179"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=12179"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=12179"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}