Changeset 647607
- Timestamp:
- 01/03/2013 10:06:33 PM (13 years ago)
- Location:
- wp-markdown-syntax-sugar/trunk
- Files:
-
- 2 edited
-
readme.txt (modified) (4 diffs)
-
wp-markdown-syntax-sugar.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wp-markdown-syntax-sugar/trunk/readme.txt
r585083 r647607 4 4 Tags: markdown, highlight.js, syntax, code, pre, highlight 5 5 Requires at least: 3.1 6 Tested up to: 3. 4.17 Stable tag: 0.1. 06 Tested up to: 3.5 7 Stable tag: 0.1.1 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 15 15 16 16 WP Markdown Syntax Sugar work in conjunction with plugins such as [wp-markdown](http://wordpress.org/extend/plugins/wp-markdown/) 17 and [wp-high tlight.js](http://wordpress.org/extend/plugins/wp-highlightjs/). Markdown is fantastic markup for easily17 and [wp-highlight.js](http://wordpress.org/extend/plugins/wp-highlightjs/). Markdown is fantastic markup for easily 18 18 writing blogs, and [highlight.js](http://softwaremaniacs.org/soft/highlight/en/) is an extremely easy way to highlight 19 19 code examples. In most cases, highlight.js automatically detects the proper language for a block of code. In certain … … 36 36 The shebang is removed, and the code is outputted as: 37 37 38 <pre><code class=" ruby">class Foo < Bar38 <pre><code class="language-ruby">class Foo < Bar 39 39 def hello 40 40 puts "Hello World!" … … 57 57 = 0.1.0 = 58 58 * Initial release 59 = 0.1.1 = 60 * Modified output to use the HTML5 recommended syntax highlighting class names, e.g. `language-ruby`. For more information, see [the HTML5 spec](http://www.w3.org/html/wg/drafts/html/master/text-level-semantics.html#the-code-element) -
wp-markdown-syntax-sugar/trunk/wp-markdown-syntax-sugar.php
r585083 r647607 2 2 /* 3 3 Plugin Name: wp-markdown-syntax-sugar 4 Plugin URI: http ://www.visoftinc.com4 Plugin URI: https://github.com/visoft/wp-markdown-syntax-sugar 5 5 Description: This WordPress plugin works to enhance the handling of code blocks in markdown syntax. 6 Version: 0.1. 06 Version: 0.1.1 7 7 Author: Damien White (Visoft, Inc.) 8 8 Author URI: http://www.visoftinc.com … … 11 11 12 12 /* 13 Copyright 2012 Visoft, Inc. <info@visoftinc.com>13 Copyright 2012-2013 Visoft, Inc. <info@visoftinc.com> 14 14 15 15 This file is part of wp-markdown-syntax-sugar … … 45 45 $code = stripslashes( trim( htmlspecialchars_decode( $code, ENT_NOQUOTES ) ) ); 46 46 } 47 return '<pre><code class=" '. $language . '">' . $code . '</code></pre>';47 return '<pre><code class="language-'. $language . '">' . $code . '</code></pre>'; 48 48 }
Note: See TracChangeset
for help on using the changeset viewer.