Style.
This commit is contained in:
parent
e38120c6db
commit
7bbd5ab5b3
|
@ -1161,12 +1161,13 @@ final class Scanner
|
||||||
return tagToken(startMark, reader_.mark, slice.utf32To8, handleEnd);
|
return tagToken(startMark, reader_.mark, slice.utf32To8, handleEnd);
|
||||||
}
|
}
|
||||||
|
|
||||||
///Scan a block scalar token with specified style.
|
/// Scan a block scalar token with specified style.
|
||||||
Token scanBlockScalar(const ScalarStyle style) @trusted pure
|
Token scanBlockScalar(const ScalarStyle style)
|
||||||
|
@trusted pure
|
||||||
{
|
{
|
||||||
const startMark = reader_.mark;
|
const startMark = reader_.mark;
|
||||||
|
|
||||||
//Scan the header.
|
// Scan the header.
|
||||||
reader_.forward();
|
reader_.forward();
|
||||||
|
|
||||||
const indicators = scanBlockScalarIndicators(startMark);
|
const indicators = scanBlockScalarIndicators(startMark);
|
||||||
|
@ -1177,9 +1178,10 @@ final class Scanner
|
||||||
scanBlockScalarIgnoredLine(startMark);
|
scanBlockScalarIgnoredLine(startMark);
|
||||||
throwIfError();
|
throwIfError();
|
||||||
|
|
||||||
//Determine the indentation level and go to the first non-empty line.
|
// Determine the indentation level and go to the first non-empty line.
|
||||||
Mark endMark;
|
Mark endMark;
|
||||||
uint indent = max(1, indent_ + 1);
|
uint indent = max(1, indent_ + 1);
|
||||||
|
|
||||||
reader_.sliceBuilder.begin();
|
reader_.sliceBuilder.begin();
|
||||||
if(increment == int.min)
|
if(increment == int.min)
|
||||||
{
|
{
|
||||||
|
@ -1199,7 +1201,7 @@ final class Scanner
|
||||||
//Using appender_, so clear it when we're done.
|
//Using appender_, so clear it when we're done.
|
||||||
scope(exit){appender_.clear();}
|
scope(exit){appender_.clear();}
|
||||||
|
|
||||||
//Scan the inner part of the block scalar.
|
// Scan the inner part of the block scalar.
|
||||||
while(reader_.column == indent && reader_.peek() != '\0')
|
while(reader_.column == indent && reader_.peek() != '\0')
|
||||||
{
|
{
|
||||||
appender_.put(breaks);
|
appender_.put(breaks);
|
||||||
|
|
Loading…
Reference in a new issue