[ruby/reline] Use colored doc output with ANSI escape sequence

https://github.com/ruby/reline/commit/7d1c75b43f
This commit is contained in:
aycabta 2021-08-28 02:25:57 +09:00
Родитель 3d757ba1b6
Коммит 6273b9bb62
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -243,11 +243,11 @@ module Reline
end
end
return nil if doc.nil?
formatter = RDoc::Markup::ToBs.new
formatter = RDoc::Markup::ToAnsi.new
formatter.width = 40
str = doc.accept(formatter)
[Reline::CursorPos.new(cursor_pos_to_render.x + 40, cursor_pos_to_render.y + pointer), str.split("\n"), nil, '40']
[Reline::CursorPos.new(cursor_pos_to_render.x + 40, cursor_pos_to_render.y + pointer), str.split("\n"), nil, '49']
}
def readmultiline(prompt = '', add_hist = false, &confirm_multiline_termination)