Permalink
Browse files

修正EmailOptimizer识别时出错 issues #9

  • Loading branch information...
1 parent 3ab7e02 commit ec494e10884ed462be7d35635080bc6d15c6bbd0 @leizongmin committed Dec 9, 2013
Showing with 2 additions and 2 deletions.
  1. +1 −1 lib/module/EmailOptimizer.js
  2. +1 −1 test.js
@@ -80,7 +80,7 @@ exports.doOptimize = function (words) {
}
// 检查剩余部分
- if (has_at && words[ie]) {
+ if (addr_start && has_at && words[ie]) {
var word = words[ie];
var is_ascii = ((word.p == POSTAG.A_NX) ||
(word.p == POSTAG.A_M && word.w in EMAILCHAR))
View
@@ -115,7 +115,7 @@ text = '10个100%纯度的';
text = '中国,是一个 多民族的国家。leizongmin@qq.com http://baidu.com哈哈';
//text = '打开{http://site.com}网站';
text = '「美图区」';
-text = '我正在参加抽奖活动:#2013易迅送你快乐到家#,奖品丰厚,你也赶快来参加吧!活动地址:http://url.cn/Ds2hyz@wzgdmje';
+text = '我正在参加抽奖活动:#2013易迅送你快乐到家#,奖品丰厚,你也赶快来参加吧!活动地址:http://url.cn/Ds2hyz @wzgdmje';
var s = new Date().getTime();
var segment = new Segment();

0 comments on commit ec494e1

Please sign in to comment.