From 877d5ab36aace3aa1712adb88319e0825877545e Mon Sep 17 00:00:00 2001 From: mumuy Date: Tue, 10 May 2016 12:09:13 +0800 Subject: [PATCH] =?UTF-8?q?updated=20=E8=80=81=E5=A9=86=E7=9A=84=E8=80=81?= =?UTF-8?q?=E5=85=AC=20bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- script/relationship.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/script/relationship.js b/script/relationship.js index 55f55d6..864eca5 100644 --- a/script/relationship.js +++ b/script/relationship.js @@ -578,7 +578,7 @@ sex = 0; } } - sex2 = selector.match(/,[mw]|([olx]s)|(d(&[ol]))$/)?0:1; + sex2 = selector.match(/,([mw]|[olx]s|d(&[ol]))$/)?0:1; var getId = function(selector){ var s=''; if(!hash[selector]){ @@ -712,7 +712,7 @@ window.relationship = relationship; })(window); -// console.log(relationship({text:'妈妈的爸爸的姐姐的妹妹的哥哥的妹妹的姐姐',sex:1})); +// console.log(relationship({text:'老婆的老公'})); //老公的老婆的儿子的爸爸的老婆的儿子的爸爸 //我的三舅的儿子的爸爸的妹妹的儿子的叔叔的哥哥 //老婆的外孙的姥姥