Skip to content

Commit

Permalink
[Bugfix] 当标题带有类似xxx.js文件名时结尾会被转大写JS
Browse files Browse the repository at this point in the history
  • Loading branch information
overtrue committed Nov 27, 2015
1 parent 7e52dd1 commit 8e27d48
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion AutoCorrect.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function auto_space($content)
public function auto_correct($content)
{
foreach ($this->dicts as $from => $to) {
$content = preg_replace("/\b$from\b/i", $to, $content);
$content = preg_replace("/(?<!\.|[a-z]){$from}(?!\.|[a-z])/i", $to, $content);
}

return $content;
Expand Down

0 comments on commit 8e27d48

Please sign in to comment.