Inquirer.js icon indicating copy to clipboard operation
Inquirer.js copied to clipboard

Color highlighting of selected options stop working if the choice name has two slashes.

Open pastelsky opened this issue 8 years ago • 1 comments

When any of the choice names has a double slash like so:

inquirer.prompt([{
  type: 'list',
  name: 'name',
  message: `msg`,
  choices: [
    {name: 'https://x.com', value:''https://x.com'}, 
    {name: 'https://y.com', value:''https://y.com'}
  ]
}])

The selected option does not turn green.

pastelsky avatar May 22 '17 13:05 pastelsky

inquirer.prompt([{
  type: 'list',
  name: 'name',
  message: `msg`,
  choices: [
    {name: 'https://x.com', value:'https://x.com'}, 
    {name: 'https://y.com', value:'https://y.com'}
  ]
}])

The example above highlighted the text as expected. After value from your example I removed one of the singlequotes as they are invalid.

JPeer264 avatar May 30 '17 18:05 JPeer264