Repository navigation
A rule's set values split on the comma a Chinese input method types - #1283
Merged
WaylandYang merged 2 commits intoOct 16, 2026
Merged
Conversation
Signed-off-by: dada-yan <BinjunYann@gmail.com>
WaylandYang
approved these changes
Oct 16, 2026
WaylandYang
left a comment
Contributor
There was a problem hiding this comment.
Thank you. Splitting set operands on /[,,]/ matches what citations.ts already does, and since operandText still joins with , , a set the form writes reopens unchanged. Leaving 、 out is right, since labels like 砂岩、泥岩互层 contain it, and not locking , members in metadataOnly lets rules saved before this change repair themselves on the next save. Merging.
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.
A rule condition's set, typed with a Chinese input method, is saved as one member, because
parseOperandsplits it only on the ASCII comma.Problem
In Chinese mode the comma key types
,(U+FF0C). On dev 15fd7d5, the condition 解释is one of气测异常,气测异常后效is saved as:["气测异常,气测异常后效"]No value equals that string, so
is one ofnever holds, andis not one ofholds for every entity that has a value. The rule list shows the operand as it was typed, so nothing looks wrong.Change
parseOperandsplitsinandnot_inoperands on/[,,]/, ascitations.tsdoes for[1,2].operandTextstill joins with,, so a set the form now writes reopens and saves to the same members.Verification
ruleSetOperands.test.ts:splits in members on the comma a Chinese input method types, and the same fornot_in, on气测异常,气测异常后效(what the editor shows for that rule saved before this change) and气测异常,气测异常后效, 气层(the editor writes,back, so editing in Chinese mode mixes both commas). On dev with only the test added, both fail:expected [ '气测异常,气测异常后效' ] to deeply equal [ '气测异常', '气测异常后效' ].pnpm test40 files, 283 tests passed;pnpm buildpasses.Limits
metadataOnlystill locks members containing,, not,(fix(web): preserve computed definitions during rule metadata edits #829). The next full-form save, even a rename, splits a,member: for a rule saved before this change that is the repair; a,member written through the API is split too.、(U+3001) still does not separate members, since labels such as 砂岩、泥岩互层 contain it.ruleOperandSetHint(en "comma separated", zh "逗号分隔") is defined in both locales but never rendered; this PR leaves it alone.