docs: function (tag, text, index) {
      var re = wp.shortcode.regexp(tag)
      var match
      var result
  
      re.lastIndex = index || 0
      match = re.exec(text)
  
      if (!match) {
        return
      }
  
      // If we matched an escaped shortcode, try again.
      if (match[1] === '[' && match[7] === ']') {
        return wp.shortcode.next(tag, text, re.lastIndex)
      }
  
      result = {
        index: match.index,
        content: match[0],
        shortcode: wp.shortcode.fromMatch(match)
      }
  
      // If we matched a leading `[`, strip it from the match
      // and increment the index accordingly.
      if (match[1]) {
        result.content = result.content.slice(1)
        result.index++
      }
  
      // If we matched a trailing `]`, strip it from the match.
      if (match[7]) {
        result.content = result.content.slice(0, -1)
      }
  
      return result
    }