Environment
- Operating system: Windows 11 Pro, version 25H2, OS build 26200.8524
- Browser: Microsoft Edge 149.0.4022.52, 64-bit
- Input method: Microsoft Pinyin
- Websites:
- Editor: CodeMirror 6 syntax highlighting
- Reproducibility: Always
Affected punctuation marks
- Chinese comma: ,
- Chinese full stop: 。
- Chinese opening and closing single quotation marks: ‘ ’
- Chinese opening and closing double quotation marks: “ ”
- Enumeration comma: 、
- Chinese colon: :
- Chinese semicolon: ;
- Chinese question mark: ?
- Chinese exclamation mark: !
Steps to reproduce
- Open an edit page on minecraft.wiki or zh.minecraft.wiki.
- Enable CodeMirror 6 syntax highlighting.
- Use Microsoft Pinyin with Chinese punctuation enabled.
- Enter ordinary text, for example:
甲乙
- Place the caret between the two characters:
甲|乙
- Press the key for any affected Chinese punctuation mark a times, where a = 2x and x is a positive natural number.
The speed and interval of the key presses do not affect the result.
Actual result
Only x punctuation marks are inserted after a = 2x key presses.
In other words:
Number of key presses: a = 2x
Number of inserted punctuation marks: x = a / 2
Exactly every second Chinese punctuation input is lost.
For example, pressing the Chinese comma key six times produces:
甲,,,乙
instead of:
甲,,,,,,乙
The same deterministic 2:1 relationship occurs with all affected punctuation marks.
Expected result
All a punctuation marks should be inserted after a key presses.
Number of key presses: a
Expected number of inserted punctuation marks: a
Context-dependent exception
Repeated input works normally when the caret is located between two punctuation marks of the same type as the punctuation being entered.
For example:
,|,
!|!
Here, the punctuation marks on both sides of the caret are of the same type as the punctuation being entered.
If the caret is between ordinary text, between punctuation marks of different types, or in any other tested context that is not between punctuation marks of the same type, exactly every second Chinese punctuation input is lost.
Comparison results
- ASCII punctuation works normally. For example, pressing the ASCII comma key six times produces:
甲,,,,,,乙
- Disabling syntax highlighting fixes the problem.
- Re-enabling syntax highlighting makes the problem return.
- Disabling autocompletion does not fix the problem.
- Disabling automatic bracket closing does not fix the problem.
- Disabling automatic HTML tag closing does not fix the problem.
- The issue occurs every time on both minecraft.wiki and zh.minecraft.wiki.
- The issue affects all Chinese punctuation marks listed above.
Additional information
This is not related to keyboard repeat rate or typing speed. For any even number of key presses a = 2x, exactly x punctuation marks are inserted, regardless of the interval between individual key presses.
The behaviour depends on the text surrounding the caret. Repeated input works normally only when the caret is between punctuation marks of the same type. In all other tested contexts, exactly every second Chinese punctuation input is lost while CodeMirror 6 syntax highlighting is enabled.
