|
@@ -47,7 +47,7 @@ |
|
|
block discarded – undo |
|
47
|
47
|
// 正则表达式匹配单词,对匹配到的每个单词应用转换逻辑 |
|
48
|
48
|
// The regular expression matches words and applies conversion logic to each word it matches |
|
49
|
49
|
$pattern = '/\b(?![\'-])\w+(?<![\'-])\b/u'; // 'u'修饰符用于支持 Unicode 字符 The 'u' modifier is used to support Unicode characters |
|
50
|
|
- $callback = function ($matches) { |
|
|
50
|
+ $callback = function($matches) { |
|
51
|
51
|
$match = $matches[0]; |
|
52
|
52
|
// 若单词长度超过2,则进行转换 |
|
53
|
53
|
// If the word length is more than 2, the conversion is performed |
Please login to merge, or discard this patch.