function infoFromLabel(label) {
  const info = LABEL_REG_EXP.exec(label)
  if (!info) {
    throw new Error(`improperly formated live code block label: ${label}`)
  }

  let tags = []
  if (info[3].length > 1) {// Will include ':', minimum if there are tags is 2 chars
    tags = info[3].substring(1).split(',')
  }

  // Validate parsing
  if (info[2] !== BLOCK_TYPES.OUTPUT && expectedErrorTags(tags).length) { // Only outputs can expect errors
    throw new Error(`${info[2]}s cannot expect errors (only outputs): ${label}`)
  }
  if (info[2] !== BLOCK_TYPES.OUTPUT && includedGroupNames(tags).length) { // Only outputs can include groups for evaluation
    throw new Error(`${info[2]}s cannot include modules for evaluation (only outputs): ${label}`)
  }

  // Looks good
  return {
    group: info[1],
    type: info[2],
    tags
  }
}
// Throws an error if it looks like a live code block but the label can't be parsed.
Throws an error if it looks like a live code block but the label can't be parsed.
Throws an error if it looks like a live code block but the label can ' t be parsed .
function infoFromLabel(label) {
  const info = LABEL_REG_EXP.exec(label)
  if (!info) {
    throw new Error(`improperly formated live code block label: ${label}`)
  }
  let tags = []
  if (info[3].length > 1) {
    tags = info[3].substring(1).split(',')
  }
  if (info[2] !== BLOCK_TYPES.OUTPUT && expectedErrorTags(tags).length) { 
    throw new Error(`${info[2]}s cannot expect errors (only outputs): ${label}`)
  }
  if (info[2] !== BLOCK_TYPES.OUTPUT && includedGroupNames(tags).length) { 
    throw new Error(`${info[2]}s cannot include modules for evaluation (only outputs): ${label}`)
  }
  return {
    group: info[1],
    type: info[2],
    tags
  }
}
function infoFromLabel ( label ) { const info = LABEL_REG_EXP . exec ( label ) if ( ! info ) { throw new Error ( ` ${ label } ` ) } let tags = [ ] if ( info [ 3 ] . length > 1 ) { tags = info [ 3 ] . substring ( 1 ) . split ( ',' ) } if ( info [ 2 ] !== BLOCK_TYPES . OUTPUT && expectedErrorTags ( tags ) . length ) { throw new Error ( ` ${ info [ 2 ] } ${ label } ` ) } if ( info [ 2 ] !== BLOCK_TYPES . OUTPUT && includedGroupNames ( tags ) . length ) { throw new Error ( ` ${ info [ 2 ] } ${ label } ` ) } return { group : info [ 1 ] , type : info [ 2 ] , tags } }
Throws an error if it looks like a live code block but the label can't be parsed.
Throws an error if it looks like a live code block but the label can ' t be parsed .
// Will include ':', minimum if there are tags is 2 chars // Validate parsing // Only outputs can expect errors // Only outputs can include groups for evaluation // Looks good