aboutsummaryrefslogtreecommitdiff
path: root/lib/unicode/prop
diff options
context:
space:
mode:
Diffstat (limited to 'lib/unicode/prop')
-rw-r--r--lib/unicode/prop/uprop_get_tc.c4
-rw-r--r--lib/unicode/prop/uprop_get_uc.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/lib/unicode/prop/uprop_get_tc.c b/lib/unicode/prop/uprop_get_tc.c
index 442db6e..83649e1 100644
--- a/lib/unicode/prop/uprop_get_tc.c
+++ b/lib/unicode/prop/uprop_get_tc.c
@@ -64,9 +64,11 @@ _MLIB_DEFINE_BSEARCH_KV(struct rview, lookup, M(ch))
struct rview
uprop_get_tc(rune ch, struct tcctx ctx)
{
+ constexpr rune COMB_DOT_ABOVE = 0x307;
+
if (ch == 'i' && ctx.az_or_tr)
return M(U'İ');
- if (ch == 0x307 && ctx.lt && ctx.after_i)
+ if (ch == COMB_DOT_ABOVE && ctx.lt && ctx.after_soft_dotted)
return M();
rune CH = uprop_get_stc(ch);
diff --git a/lib/unicode/prop/uprop_get_uc.c b/lib/unicode/prop/uprop_get_uc.c
index ecb0883..4563921 100644
--- a/lib/unicode/prop/uprop_get_uc.c
+++ b/lib/unicode/prop/uprop_get_uc.c
@@ -119,11 +119,13 @@ _MLIB_DEFINE_BSEARCH_KV(struct rview, lookup, M(ch))
struct rview
uprop_get_uc(rune ch, struct ucctx ctx)
{
+ constexpr rune COMB_DOT_ABOVE = 0x307;
+
if (ch == U'ß')
return ctx.ẞ ? M(U'ẞ') : M('S', 'S');
if (ch == 'i' && ctx.az_or_tr)
return M(U'İ');
- if (ch == 0x307 && ctx.lt && ctx.after_i)
+ if (ch == COMB_DOT_ABOVE && ctx.lt && ctx.after_soft_dotted)
return M();
rune CH = uprop_get_suc(ch);