Repository navigation
Conversation
🦋 Changeset detectedLatest commit: 5320aa2 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch had an error being deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
combineCharacter에'ㅘ'처럼 합쳐진 이중모음을 중성으로 전달하면, 에러 없이 다른 문자를 반환하는 문제를 수정합니다.합쳐진 이중모음(
ㅘ ㅙ ㅚ ㅝ ㅞ ㅟ ㅢ)이 들어가는 조합 3,724개(초성 19 × 이중모음 7 × 종성 28)가 모두 잘못된 결과를 반환합니다. 초성이ㄱ이면 한글이 아닌 문자가 나오고, 나머지 초성에서는 다른 한글 글자가 나와 결과만 보고는 알아채기 어렵습니다.원인
#333 이후
canBeJungseong('ㅘ')가true를 반환해 입력 검증은 통과하지만, 인덱스를 찾는JUNGSEONGS에는 이중모음이'ㅗㅏ'같은 분해형으로만 들어 있어indexOf가-1을 반환합니다. 중성 인덱스가-1로 계산되어 결과가 앞 초성에 중성ㅣ가 붙은 글자가 되고(예:ㅎ→피), 앞 초성이 없는ㄱ은 한글 범위를 벗어납니다.#333 이전 커밋에서는 같은 입력에
Invalid hangul Characters에러가 발생했으므로 회귀에 해당합니다.수정
인덱스를 찾기 전에
DISASSEMBLED_VOWELS_BY_VOWEL로 합쳐진 모음을 분해형으로 변환합니다. 단모음은 자기 자신으로, 분해형은 그대로 통과하므로 기존 입력의 동작은 바뀌지 않습니다.테스트
PR Checklist