1610
return this.scalarFromToken(token);
1611
}
1612
>
// For unquoted (plain) scalars, fold continuation lines across newlines
yaml.ts
1613
>
let value = token.value;
1614
>
let endOffset = token.endOffset;
1615
>
1616
>
while (true) {
1617
>
// Look ahead for a newline followed by a plain scalar continuation
1618
>
let hasNewline = false;
1619
>
let p = this.pos;
1620
>
while (p < this.tokens.length) {
1621
>
const t = this.tokens[p];
1622
>
if (t.type === TokenType.Newline) {
1623
hasNewline = true;
1624
p++;
1625
>
} else if (t.type === TokenType.Indent || t.type === TokenType.Comment) {
yaml.ts
1626
p++;
1628
>
break;
1629
>
}
1630
>
}
1631
>
1632
>
if (!hasNewline || p >= this.tokens.length) { break; }
1633
1634
const nextToken = this.tokens[p];
1635
>
if (nextToken.type === TokenType.Scalar && nextToken.format === 'none') {
yaml.ts
1636
// Fold continuation line into the scalar
1637
this.pos = p + 1;