quoteDepth function

int quoteDepth(
  1. String line
)

How many > quote markers open line.

Implementation

int quoteDepth(String line) {
  var depth = 0;
  var i = 0;
  while (i < line.length) {
    final c = line.codeUnitAt(i);
    if (c == _space || c == _tab) {
      i += 1;
    } else if (c == 0x3E /* > */ ) {
      depth += 1;
      i += 1;
    } else {
      break;
    }
  }
  return depth;
}