Changeset 668511
- Timestamp:
- 02/15/2013 03:30:00 PM (13 years ago)
- Location:
- prettify-code-syntax/trunk
- Files:
-
- 2 edited
-
prettify-code-syntax.php (modified) (1 diff)
-
readme.txt (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
prettify-code-syntax/trunk/prettify-code-syntax.php
r668510 r668511 164 164 $prettify_code = false; 165 165 166 $regex = '/(<pre\s+ .*?class\s*?=\s*?[",\'].*?prettyprint\b.*?[",\'].*?>)(.*?)(<\/pre>)/si';166 $regex = '/(<pre\s+[^>]*?class\s*?=\s*?[",\'].*?prettyprint.*?[",\'].*?>)(.*?)(<\/pre>)/si'; 167 167 $content = preg_replace_callback($regex, array($this, 'parse_content_pre'), $content); 168 $regex = '/(<code\s+[^>]*?class\s*?=\s*? "\s*?prettyprint.*?".*?>)(.*?)(<\/code>)/si';168 $regex = '/(<code\s+[^>]*?class\s*?=\s*?[",\']\s*?prettyprint.*?[",\'].*?>)(.*?)(<\/code>)/si'; 169 169 // print_r($content); 170 170 $content = preg_replace_callback($regex, array($this, 'parse_content_code'), $content); -
prettify-code-syntax/trunk/readme.txt
r668510 r668511 35 35 You have also the option to include your **custom style**. 36 36 37 If you have a style that would like to see included in the option list, just [contact me](http://www.frontendmatters.com/contact/), or [fork me](https://github.com/jesucarr/wordpress-prettify-code-syntax). 38 37 39 = Notes = 38 40 … … 47 49 * Using a chaching plugin like W3 Total Cache is highly recommended. 48 50 51 = Demo = 52 53 You can find a [front end demo](http://www.frontendmatters.com/open-source/wordpress-plugins/prettify-code-syntax/) here a the bottom. 54 49 55 == Installation == 50 56 … … 53 59 You can also install it manually: 54 60 55 1. Download the plugin and upload the contents to the `/wp-content/plugins/` directory 61 1. Download the plugin and upload the contents to the `/wp-content/plugins/` directory, using FTP or the Upload tab in Plugins > Add New. 56 62 1. Activate the plugin through the 'Plugins' menu in WordPress 57 63 1. Change settings if neccessary at Settings > Prettify Code Syntax … … 61 67 = I want to add the tags `</code>` or `</pre>` to my code, how can I do it without breaking the snippet? = 62 68 63 You need toadd a space before the closing `>`, like this `</code >`69 You can add a space before the closing `>`, like this `</code >` 64 70 71 = I found a bug, or have some code improvements, or have something to ask about the plugin. How do I contact you? = 72 73 Best thing with anything related to code would be to [fork me or open an issue](https://github.com/jesucarr/wordpress-prettify-code-syntax). For anything else you can [post a comment](http://www.frontendmatters.com/open-source/wordpress-plugins/prettify-code-syntax/) or [contact me](http://www.frontendmatters.com/contact/). 65 74 66 75 == Screenshots ==
Note: See TracChangeset
for help on using the changeset viewer.