Plugin Directory

Changeset 884188


Ignore:
Timestamp:
03/29/2014 03:03:20 PM (12 years ago)
Author:
mathzqy
Message:

roll back

Location:
latex/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • latex/trunk/latex.php

    r884175 r884188  
    44Plugin URI: http://wordpress.org/extend/plugins/latex/
    55Description: Using MathJax and LaTex image service, this plugin provides a general solution to add and display your mathematical fourmula, no matter the visitors are visiting your blog or read from Google Reader.
    6 Version: 3.4.9
     6Version: 3.4.10
    77Author: zhiqiang
    88Author URI: http://zhiqiang.org
     
    4545function decode_entities_latex($text) {
    4646    $text= html_entity_decode($text,ENT_QUOTES,"ISO-8859-1"); #NOTE: UTF-8 does not work!
    47     $text = preg_replace_callback(
    48         '/&#(\d+);/m',
    49         function($m) {
    50             return chr(intval($m[1]));
    51         },
    52         $text); # decimal notation
    53     $text = preg_replace_callback(
    54         '/&#x([a-f0-9]+);/mi',
    55         function($m) {
    56             return chr(intval("0x$m[1]"));
    57         },
    58         $text); #hex notation
     47    $text= preg_replace('/&#(\d+);/me',"chr(\\1)",$text); #decimal notation
     48
     49    $text= preg_replace('/&#x([a-f0-9]+);/mei',"chr(0x\\1)",$text);  #hex notation
     50
     51    // $text = preg_replace_callback(
     52    //        '/&#(\d+);/m',
     53    //        function($m) {
     54    //            return chr(intval($m[1]));
     55    //        },
     56     //       $text); # decimal notation
     57     //   $text = preg_replace_callback(
     58      //      '/&#x([a-f0-9]+);/mi',
     59       //     function($m) {
     60        //        return chr(intval("0x$m[1]"));
     61         //   },
     62          //  $text); #hex notation
    5963    return $text;
    6064}
  • latex/trunk/readme.txt

    r884175 r884188  
    1313verion logs:
    1414
    15 ver 3.4.9 revert the change in ver 3.4.8.
     15ver 3.4.10 revert the change in ver 3.4.8.
    1616
    1717ver 3.4.7 make the space around inline formula to be optional. It's closed by default. But I recommend turn on it on Chinese blog.
Note: See TracChangeset for help on using the changeset viewer.