Plugin Directory

Changeset 668511


Ignore:
Timestamp:
02/15/2013 03:30:00 PM (13 years ago)
Author:
jesucarr
Message:

Improve readme and regex, remove grunt

Location:
prettify-code-syntax/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • prettify-code-syntax/trunk/prettify-code-syntax.php

    r668510 r668511  
    164164        $prettify_code = false;
    165165
    166         $regex = '/(<pre\s+.*?class\s*?=\s*?[",\'].*?prettyprint\b.*?[",\'].*?>)(.*?)(<\/pre>)/si';
     166        $regex = '/(<pre\s+[^>]*?class\s*?=\s*?[",\'].*?prettyprint.*?[",\'].*?>)(.*?)(<\/pre>)/si';
    167167        $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';
    169169        // print_r($content);
    170170        $content = preg_replace_callback($regex, array($this, 'parse_content_code'), $content);
  • prettify-code-syntax/trunk/readme.txt

    r668510 r668511  
    3535You have also the option to include your **custom style**.
    3636
     37If 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
    3739= Notes =
    3840
     
    4749* Using a chaching plugin like W3 Total Cache is highly recommended.
    4850
     51= Demo =
     52
     53You can find a [front end demo](http://www.frontendmatters.com/open-source/wordpress-plugins/prettify-code-syntax/) here a the bottom.
     54
    4955== Installation ==
    5056
     
    5359You can also install it manually:
    5460
    55 1. Download the plugin and upload the contents to the `/wp-content/plugins/` directory
     611. Download the plugin and upload the contents to the `/wp-content/plugins/` directory, using FTP or the Upload tab in Plugins > Add New.
    56621. Activate the plugin through the 'Plugins' menu in WordPress
    57631. Change settings if neccessary at Settings > Prettify Code Syntax
     
    6167= I want to add the tags `</code>` or `</pre>` to my code, how can I do it without breaking the snippet? =
    6268
    63 You need to add a space before the closing `>`, like this `</code >`
     69You can add a space before the closing `>`, like this `</code >`
    6470
     71= I found a bug, or have some code improvements, or have something to ask about the plugin. How do I contact you? =
     72
     73Best 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/).
    6574
    6675== Screenshots ==
Note: See TracChangeset for help on using the changeset viewer.