Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

请问想让/改为全角/的补丁应该怎么写? #624

Closed
chwt163 opened this issue Jan 18, 2024 · 2 comments
Closed

请问想让/改为全角/的补丁应该怎么写? #624

chwt163 opened this issue Jan 18, 2024 · 2 comments

Comments

@chwt163
Copy link

chwt163 commented Jan 18, 2024

punctuator/half_shape//: '/'
punctuator/half_shape/%: '%'
punctuator/half_shape/$: '¥'
punctuator/half_shape/~: '~'

不想直接改default.yaml,想把补丁写在default.custom.yaml,上面的%¥~都没问题,就是/不行,会报错,加空格加引号不报错,但不生效。

@iDvel
Copy link
Owner

iDvel commented Jan 18, 2024

patch 的语法不完备,不完全支持 key 里面含有 / @ + = 这几个字符有特殊含义。
rime/librime#676 (comment)

你可以直接给 punctuator/half_shape 打一个全套的补丁:

patch:
  punctuator/half_shape:
    # ...

单独修改其中的几个,可以这么写,我测试是可以的:

patch:
  punctuator/half_shape:
    __include: default:/punctuator/half_shape  # 先写上这一行
    '/' : '/'  # 再写上要单独修改的
    '~' : '~'  # 再写上要单独修改的

@chwt163
Copy link
Author

chwt163 commented Jan 18, 2024

patch 的语法不完备,不完全支持 key 里面含有 / @ + = 这几个字符有特殊含义。
rime/librime#676 (comment)

你可以直接给 punctuator/half_shape 打一个全套的补丁:

patch:
  punctuator/half_shape:
    # ...

单独修改其中的几个,可以这么写,我测试是可以的:

patch:
  punctuator/half_shape:
    __include: default:/punctuator/half_shape  # 先写上这一行
    '/' : '/'  # 再写上要单独修改的
    '~' : '~'  # 再写上要单独修改的

明白,搞定了,谢谢大佬!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants