Skip to content

Commit

Permalink
🔃临时恢复旧版「惊喜句号」功能。
Browse files Browse the repository at this point in the history
  • Loading branch information
Lantaio committed Apr 1, 2024
1 parent a628198 commit 7b72b2f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion joy_pinyin.schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ engine: # 輸入引擎設定,即掛接組件的「處方」
processors: # 一、這批組件處理各類按鍵消息
- ascii_composer # 處理英文模式及中英文切換
- recognizer # 與 matcher 搭配,處理符合特定規則的輸入碼,如網址、反查等
- lua_processor@*joy_CyberPunc_p # 优化输入标点符号的逻辑。
- lua_processor@*joy_period_p # 优化输入标点符号的逻辑。
- lua_processor@*joy_select_character_p # 用'['和']'来以词定字
- key_binder # 在特定條件下將按鍵綁定到其他按鍵,如重定義逗號、句號爲候選翻頁鍵
- speller # 拼寫處理器,接受字符按鍵,編輯輸入碼
Expand All @@ -54,6 +54,7 @@ engine: # 輸入引擎設定,即掛接組件的「處方」
- punct_segmentor # 標識句讀段落
- fallback_segmentor # 標識其他未標識段落
translators: # 三、這批組件翻譯特定類型的編碼段爲一組候選文字
- lua_translator@*joy_period_t # 处理数字后跟小数点或句号的情况
- punct_translator # 轉換標點符號
- table_translator@custom_phrase # 自定义词典,用词典优先级实现常用字固顶功能
- lua_translator@*joy_date_t # 当前时间、日期、星期
Expand Down
2 changes: 1 addition & 1 deletion lua/joy_period_p.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ local function joy_period_processor(key, env)
-- 如果 不是全角模式,就...
if not context:get_option('full_shape') then
-- 如果 没有候选框,就...
if not context:has_menu() then
if not context:is_composing() then
-- 如果 按键是句点 并且 之前上屏的是数字,就...
if (key:repr() == 'period') and tonumber(history:latest_text()) then
context:push_input('.')
Expand Down

0 comments on commit 7b72b2f

Please sign in to comment.