Repository navigation
feat: spelled-out Korean readings (hangul / formal / hanja) - #26
Merged
Merged
Conversation
toKorean gains a `style` option next to the existing mixed "150만":
- hangul "백오십만" — spoken reading, leading 일 dropped (천오백, 만 오천)
but kept before 억 and above (일억, 일조)
- formal "일백오십만" — 계약서·영수증: every 일 written, no spaces by default
- hanja "壹佰伍拾萬" — 갖은자 anti-forgery numerals (수표·어음·입금표)
The DOM hint reads the same choice from `data-numkey-korean-style`. The
default is unchanged, unknown values fall back to mixed, and the "금 … 원정"
frame stays the caller's business. New exported type KoreanReadingStyle.
Demo page shows the three styles side by side; README en/ko and CHANGELOG
updated.
Merged
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.
What
toKoreangains astyleoption next to the existing mixed150만, and the DOM hint reads the same choice fromdata-numkey-korean-style:mixed(default, unchanged)150만hangul백오십만천오백,만 오천) but kept before 억 and above (일억)formal일백오십만hanja壹佰伍拾萬formal/hanjadefault to no group spacing (one unbroken document token);spacing: trueopts back in.금 … 원정/일금 … 원整frame stays the caller's business, same as원today.fromKoreanreadshangul/formaloutput back (round-trip tests); 갖은자 input is out of scope.KoreanReadingStyle.한국어
한글 금액 병기에 완전 표기 3종 추가 —
hangul(백오십만, 말하듯이)·formal(일백오십만, 계약서·영수증)·hanja(壹佰伍拾萬, 갖은자). 기본값은 기존150만그대로이고, 앞뒤금 … 원정틀은 서식마다 달라 호출자가 붙입니다.Verification
npm run verifygreen locally: brand check, typecheck, 128 tests (14 new: 11 inkorean.test.ts, 3 indom.test.ts), ESM/CJS/IIFE/DTS build.Unreleasedentry.No version bump — release is a separate step per CONTRIBUTING.