# yaml-language-server: $schema=https://huacnlee.github.io/autocorrect/schema.json
# Config rules
rules:
# Auto add spacing between CJK (Chinese, Japanese, Korean) and English words.
# 0 - off, 1 - error, 2 - warning
space-word: 1
# Add space between some punctuations.
space-punctuation: 1
# Add space between brackets (), [] when near the CJK.
space-bracket: 1
# Add space between ``, when near the CJK.
space-backticks: 1
# Add space between dash `-`
space-dash: 0
# Convert to fullwidth.
fullwidth: 1
# To remove space near the fullwidth.
no-space-fullwidth: 1
# Fullwidth alphanumeric characters to halfwidth.
halfwidth-word: 1
# Fullwidth punctuations to halfwidth in english.
halfwidth-punctuation: 1
# Spellcheck
spellcheck: 0
似乎即使自定义了 rules,fix 参数也不会受规则的限制。
比如设置了
space-dash: 0
,即该参数不对-
进行处理,但是--fix
参数仍然会进行处理。仍然会导致人名
弗朗索瓦-马里‧阿鲁埃
变成弗朗索瓦 - 马里‧阿鲁埃
配置文件
.autocorrectrc
如下:即使是先检查,再 fix 效果也是一样的。
另请参见 https://github.com/taophilosophy/SEP-CN/actions/runs/8945663831/job/24574995842