Open wenottingham opened 1 year ago
When the ANSI sequence is directly wrapped in brackets the brackets are removed from the output.
require 'strings-ansi' str1 = "[\e[1;34mINFO\e[m] Scanning for projects..." str2 = "[ \e[1;34mINFO\e[m ] Scanning for projects..." puts str1 puts str2 puts Strings::ANSI.sanitize(str1) puts Strings::ANSI.sanitize(str2)
[INFO] Scanning for projects... [ INFO ] Scanning for projects... INFO Scanning for projects... [ INFO ] Scanning for projects...
[INFO] Scanning for projects... [ INFO ] Scanning for projects... [INFO] Scanning for projects... [ INFO ] Scanning for projects...
Describe the problem
When the ANSI sequence is directly wrapped in brackets the brackets are removed from the output.
Steps to reproduce the problem
Actual behaviour
Expected behaviour
Describe your environment