code: function matchSubInternal(el, match) {
          var matchImmediateRet = matchImmediate(el, match);
          if (matchImmediateRet === true) {
              return true;
          } else {
              el = matchImmediateRet.el;
              match = matchImmediateRet.match;
              while (el) {
                  if (matchSub(el, match)) {
                      return true;
                  }
                  el = dir(el, relativeExpr[match.nextCombinator].dir);
              }
              return false;
          }
      }
docs: recursive match by sub selector string from right to left grouped by immediate selectors recursive match by sub selector string from right to left grouped by immediate selectors