dist/yaml.legacy.js
function(indentation)
	{
		this.moveToNextLine();
		var newIndent = null;
		var indent = null;

		if ( !this.isDefined(indentation) )
		{
			newIndent = this.getCurrentLineIndentation();
			
			var unindentedEmbedBlock = this.isStringUnIndentedCollectionItem(this.currentLine);

			if ( !this.isCurrentLineEmpty() && 0 == newIndent && !unindentedEmbedBlock )
			{
				throw new YamlParseException('Indentation problem A', this.getRealCurrentLineNb() + 1, this.currentLine);
			}
		}
		else
		{
			newIndent = indentation;
		}

		var data = [this.currentLine.substr(newIndent)];

		var isUnindentedCollection = this.isStringUnIndentedCollectionItem(this.currentLine);

		var continuationIndent = -1;
		if (isUnindentedCollection === true) {
			continuationIndent = 1 + /^\-((\s+)(.+?))?\s*$/.exec(this.currentLine)[2].length;
		}

		while ( this.moveToNextLine() )
		{

			if (isUnindentedCollection && !this.isStringUnIndentedCollectionItem(this.currentLine) && this.getCurrentLineIndentation() != continuationIndent) {
				this.moveToPreviousLine();
				break;
			}

			if ( this.isCurrentLineEmpty() )
			{
				if ( this.isCurrentLineBlank() )
				{
					data.push(this.currentLine.substr(newIndent));
				}

				continue;
			}

			indent = this.getCurrentLineIndentation();
			var matches;
			if ( matches = /^( *)$/.exec(this.currentLine) )
			{
				// empty line
				data.push(matches[1]);
			}
			else if ( indent >= newIndent )
			{
				data.push(this.currentLine.substr(newIndent));
			}
			else if ( 0 == indent )
			{
				this.moveToPreviousLine();

				break;
			}
			else
			{
				throw new YamlParseException('Indentation problem B', this.getRealCurrentLineNb() + 1, this.currentLine);
			}
		}

		return data.join("\n");
	}
function(indentation)
	{
		this.moveToNextLine();
		var newIndent = null;
		var indent = null;

		if ( !this.isDefined(indentation) )
		{
			newIndent = this.getCurrentLineIndentation();
			
			var unindentedEmbedBlock = this.isStringUnIndentedCollectionItem(this.currentLine);

			if ( !this.isCurrentLineEmpty() && 0 == newIndent && !unindentedEmbedBlock )
			{
				throw new YamlParseException('Indentation problem A', this.getRealCurrentLineNb() + 1, this.currentLine);
			}
		}
		else
		{
			newIndent = indentation;
		}

		var data = [this.currentLine.substr(newIndent)];

		var isUnindentedCollection = this.isStringUnIndentedCollectionItem(this.currentLine);

		var continuationIndent = -1;
		if (isUnindentedCollection === true) {
			continuationIndent = 1 + /^\-((\s+)(.+?))?\s*$/.exec(this.currentLine)[2].length;
		}

		while ( this.moveToNextLine() )
		{

			if (isUnindentedCollection && !this.isStringUnIndentedCollectionItem(this.currentLine) && this.getCurrentLineIndentation() != continuationIndent) {
				this.moveToPreviousLine();
				break;
			}

			if ( this.isCurrentLineEmpty() )
			{
				if ( this.isCurrentLineBlank() )
				{
					data.push(this.currentLine.substr(newIndent));
				}

				continue;
			}

			indent = this.getCurrentLineIndentation();
			var matches;
			if ( matches = /^( *)$/.exec(this.currentLine) )
			{
				// empty line
				data.push(matches[1]);
			}
			else if ( indent >= newIndent )
			{
				data.push(this.currentLine.substr(newIndent));
			}
			else if ( 0 == indent )
			{
				this.moveToPreviousLine();

				break;
			}
			else
			{
				throw new YamlParseException('Indentation problem B', this.getRealCurrentLineNb() + 1, this.currentLine);
			}
		}

		return data.join("\n");
	}
function ( indentation ) { this . moveToNextLine ( ) ; var newIndent = null ; var indent = null ; if ( ! this . isDefined ( indentation ) ) { newIndent = this . getCurrentLineIndentation ( ) ; var unindentedEmbedBlock = this . isStringUnIndentedCollectionItem ( this . currentLine ) ; if ( ! this . isCurrentLineEmpty ( ) && 0 == newIndent && ! unindentedEmbedBlock ) { throw new YamlParseException ( 'Indentation problem A' , this . getRealCurrentLineNb ( ) + 1 , this . currentLine ) ; } } else { newIndent = indentation ; } var data = [ this . currentLine . substr ( newIndent ) ] ; var isUnindentedCollection = this . isStringUnIndentedCollectionItem ( this . currentLine ) ; var continuationIndent = - 1 ; if ( isUnindentedCollection === true ) { continuationIndent = 1 + / ^\-((\s+)(.+?))?\s*$ / . exec ( this . currentLine ) [ 2 ] . length ; } while ( this . moveToNextLine ( ) ) { if ( isUnindentedCollection && ! this . isStringUnIndentedCollectionItem ( this . currentLine ) && this . getCurrentLineIndentation ( ) != continuationIndent ) { this . moveToPreviousLine ( ) ; break ; } if ( this . isCurrentLineEmpty ( ) ) { if ( this . isCurrentLineBlank ( ) ) { data . push ( this . currentLine . substr ( newIndent ) ) ; } continue ; } indent = this . getCurrentLineIndentation ( ) ; var matches ; if ( matches = / ^( *)$ / . exec ( this . currentLine ) ) { // empty line data . push ( matches [ 1 ] ) ; } else if ( indent >= newIndent ) { data . push ( this . currentLine . substr ( newIndent ) ) ; } else if ( 0 == indent ) { this . moveToPreviousLine ( ) ; break ; } else { throw new YamlParseException ( 'Indentation problem B' , this . getRealCurrentLineNb ( ) + 1 , this . currentLine ) ; } } return data . join ( "\n" ) ; }
Returns the next embed block of YAML.

@param integer indentation The indent level at which the block is to be read, or null for default

@return string A YAML string

@throws YamlParseException When indentation problem are detected
Returns the next embed block of YAML .