irb icon indicating copy to clipboard operation
irb copied to clipboard

When heredoc content is between symbol begin colon and symbol content, colorizing is wrong

Open tompng opened this issue 2 years ago • 0 comments

Description

Combination with heredoc and \, heredoc content can be placed between symbol beginning : and symbol content.

<<HEREDOC; :\
heredoc
HEREDOC
symbol

Colorizing such code is wrong.

puts IRB::Color.colorize_code "<<A;:\\\na\nA\nsymbol"

heredo_symbol

Result of irb_info

Ruby version: 3.2.2
IRB version: irb 1.8.3 (2023-10-14)
InputMethod: RelineInputMethod with Reline 0.3.9 and /Users/tomoya.ishida/.inputrc
.irbrc path: /Users/tomoya.ishida/.irbrc
RUBY_PLATFORM: arm64-darwin22
LANG env: ja_JP.UTF-8
East Asian Ambiguous Width: 1

Terminal Emulator

any

Setting Files

no

tompng avatar Oct 26 '23 16:10 tompng