unquoted function

String unquoted(
  1. String line
)

line without its leading > quote markers and indentation — what a fence check has to look at, so > ```bash is seen as the fence it is.

Implementation

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