Plugin Directory

Changeset 2042928


Ignore:
Timestamp:
03/02/2019 06:51:19 PM (7 years ago)
Author:
Sparanoid
Message:

Preparing for 1.1.5 release

Location:
space-lover/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • space-lover/trunk/README.txt

    r1983669 r2042928  
    55Requires at least: 3.5.1
    66Tested up to: 5.0
    7 Stable tag: 1.1.4
     7Stable tag: 1.1.5
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    8585== Changelog ==
    8686
     87= 1.1.5 =
     88* Fix: wrong closing punc condition, props John Shen
     89
    8790= 1.1.4 =
    8891* Fix: missing space for special halfwidth characters, props John Shen
     
    153156== Upgrade Notice ==
    154157
     158= 1.1.5 =
     159* Fix: wrong closing punc condition, props John Shen
     160
    155161= 1.1.4 =
    156162* Fix: missing space for special halfwidth characters, props John Shen
  • space-lover/trunk/space-lover.php

    r1983669 r2042928  
    1111 * Plugin URI:        https://sparanoid.com/work/space-lover/
    1212 * Description:       Magically add an extra space between Chinese characters and English letters / numbers / common punctuation marks
    13  * Version:           1.1.4
     13 * Version:           1.1.5
    1414 * Author:            Tunghsiao Liu
    1515 * Author URI:        https://sparanoid.com/
     
    6868
    6969  // Space for HTML tags
    70   // https://regex101.com/r/hU3wD2/22
     70  // https://regex101.com/r/hU3wD2/25
     71
     72  // {中文}<tag>{英文/数字/起始标点/特殊符号}
     73  // 一台<a href="#">“Makerbot,二代”</a>3D打印机
    7174  $content = preg_replace('~(\p{Han})(<(?!ruby)[a-zA-Z]+?[^>]*?>)([a-zA-Z0-9\p{Ps}\p{Pi}@$#])~u', '\1 \2\3', $content);
    72   $content = preg_replace('~(\p{Han})(<\/(?!ruby)[a-zA-Z]+>)([a-zA-Z0-9\p{Pe}\p{Pf}@$#])~u', '\1\2 \3', $content);
     75
     76  // {中文}</tag>{英文/数字}
     77  // <code>Makerbot二代</code>3D打印机
     78  $content = preg_replace('~(\p{Han})(<\/(?!ruby)[a-zA-Z]+>)([a-zA-Z0-9])~u', '\1\2 \3', $content);
     79
     80  // {英文/数字/闭合标点/特殊符号}<tag>{中文}
     81  // 买了一台Makerbot,<a href="#">二代3D</a>打印机
    7382  $content = preg_replace('~([a-zA-Z0-9\p{Pe}\p{Pf}!?‽:;,.%])(<(?!ruby)[a-zA-Z]+?[^>]*?>)(\p{Han})~u', '\1 \2\3', $content);
     83
     84  // {英文/数字/起始标点/特殊符号}</tag>{中文}
     85  // 买了一台Makerbot,<a href="#">二代3D</a>打印机
    7486  $content = preg_replace('~([a-zA-Z0-9\p{Ps}\p{Pi}!?‽:;,.%])(<\/(?!ruby)[a-zA-Z]+>)(\p{Han})~u', '\1\2 \3', $content);
    7587
Note: See TracChangeset for help on using the changeset viewer.