From a7480bc8205915477c79e1d85aecbf17f3daef6e Mon Sep 17 00:00:00 2001 From: ufec <1750367868@qq.com> Date: Tue, 5 Jul 2022 15:13:40 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=A1=8C=E4=B8=8D=E8=A1=8C=20hang=20bu?= =?UTF-8?q?=20hang=20->=20xing=20bu=20xing=20with=20segment?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/data/phrases-dict.ts | 1 + test/test.ts | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/src/data/phrases-dict.ts b/src/data/phrases-dict.ts index c5b5dc2..5ae6d83 100644 --- a/src/data/phrases-dict.ts +++ b/src/data/phrases-dict.ts @@ -36891,6 +36891,7 @@ const phrases_dict: Record = { "行不苟合": [["xíng"], ["bù"], ["gǒu"], ["hé"]], "行不履危": [["xíng"], ["bù"], ["lǚ"], ["wēi"]], "行不通": [["xíng"], ["bù"], ["tōng"]], +"行不行": [["xíng"], ["bù"], ["xíng"]], "行不胜衣": [["xíng"], ["bù"], ["shèng"], ["yī"]], "行步如飞": [["xíng"], ["bù"], ["rú"], ["fēi"]], "行不逾方": [["xíng"], ["bù"], ["yú"], ["fāng"]], diff --git a/test/test.ts b/test/test.ts index a57415d..c6a34cc 100644 --- a/test/test.ts +++ b/test/test.ts @@ -365,4 +365,10 @@ describe("pinyin compact", function() { const py = pinyin(han, { style: "FIRST_LETTER", heteronym: true, compact: true }); expect(py).toEqual([["w", "m", "d", "a", "z", "y"], ["w", "m", "d", "a", "c", "y"]]); }); + + it("行不行 compact without heternonyms, normal style", function() { + const han = "行不行"; + const py = pinyin(han, { style: pinyin.STYLE_NORMAL, segment: true, heteronym: false, compact: true }); + expect(py).toEqual([["xing", "bu", "xing"]]); + }); });