Unicode characters
まだ誰も着手していません。
- 主要言語
- Ruby
- スター
- 155
- フォーク
- 37
- 平均マージ
- 4日 2時間
- マージ済み PR(30日)
- 1
説明
Currently, error_highlight does not handle Unicode characters well. There are two subissues.
- Ruby::AST::Node#first_column and #last_column seem to return the column in bytes, but String#match handles the index in characters. We need to convert the column indexes.
- Some Unicode characters are displayed as two (or more?) columns in a terminal with monospace font.
(1) is relatively simple, but (2) is a bit tough. It requires a table telling how many columns each character has. It is known that Reline has such a table. But because error_highlight is a built-in gem that is loaded at Ruby process invocation, it is not good for error_highlight to depend on Reline (unless we make Reline a special built-in gem). We need to discuss how we make the table available to error_highlight.
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、Ruby::AST::Node#first_column と #last_column が String#match とどのように使用されているかを調べ、次に Reline の lib/reline/unicode/east_asian_width.rb にある Unicode の幅データと比較します。バイトインデックスの場合と端末幅の場合の両方を再現してください。完了には、文字変換について合意されたアプローチを確立し、不適切な依存関係なしで幅データを利用できるようにすることが必要です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- ruby
- 領域
- devtools
- issue の種類
- バグ
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 25/100