code: function blockHeader(string, indentPerLevel) {
    var indentIndicator = string[0] === ' ' ? String(indentPerLevel) : '';
  
    // note the special case: the string '\n' counts as a "trailing" empty line.
    var clip = string[string.length - 1] === '\n';
    var keep = clip && (string[string.length - 2] === '\n' || string === '\n');
    var chomp = keep ? '+' : clip ? '' : '-';
  
    return indentIndicator + chomp + '\n';
  }
docs: Pre-conditions: string is valid for a block scalar, 1 <= indentPerLevel <= 9.