Page MenuHomePhabricator

Match CJK full-width brackets in CodeMirror
Closed, ResolvedPublicFeature

Description

Feature summary (what you would like to be able to do and where):
Chinese and Japanese use full-width brackets instead of half-width ones seen in Western writing systems:

( ) (U+FF08 FULLWIDTH LEFT PARENTHESIS), (U+FF09 FULLWIDTH RIGHT PARENTHESIS)
【 】 (U+3010 LEFT BLACK LENTICULAR BRACKET), (U+3011 RIGHT BLACK LENTICULAR BRACKET)
[] (U+FF3B FULLWIDTH LEFT SQUARE BRACKET), (U+FF3D FULLWIDTH RIGHT SQUARE BRACKET )
{} (U+FF5B FULLWIDTH LEFT CURLY BRACKET), (U+FF5D FULLWIDTH RIGHT CURLY BRACKET)

(See https://en.wikipedia.org/wiki/Chinese_punctuation#Marks_similar_to_European_punctuation, https://en.wikipedia.org/wiki/Japanese_punctuation#Brackets)

As we are moving towards CodeMirror 6, bracket matching of these characters can be implemented as a bonus.

Benefits (why should this be implemented?):
Pages written in CJK can benefits from this as it can get bracket matching.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Change #1022165 had a related patch set uploaded (by MusikAnimal; author: MusikAnimal):

[mediawiki/extensions/CodeMirror@master] CodeMirror: make bracket matching match CJK full-width brackets

https://gerrit.wikimedia.org/r/1022165

Change #1022165 merged by jenkins-bot:

[mediawiki/extensions/CodeMirror@master] CodeMirror: make bracket matching match CJK full-width brackets

https://gerrit.wikimedia.org/r/1022165