Skip to content

Commit

Permalink
Merge pull request #2 from overtrue-forks/master
Browse files Browse the repository at this point in the history
[Bugfix] 当标题带有类似xxx.js文件名时结尾会被转大写JS
  • Loading branch information
nauxliu committed Nov 27, 2015
2 parents 7e52dd1 + 8e27d48 commit eb05777
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 eb05777

Please sign in to comment.