We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 21fe71d commit 63adf01Copy full SHA for 63adf01
language/lexer/lexer.go
@@ -427,6 +427,9 @@ func blockStringValue(in string) string {
427
428
// Remove leading blank lines.
429
for {
430
+ if len(lines) == 1 {
431
+ break
432
+ }
433
if isBlank := lineIsBlank(lines[0]); !isBlank {
434
break
435
}
language/lexer/lexer_test.go
@@ -449,6 +449,15 @@ func TestLexer_ReportsUsefulStringErrors(t *testing.T) {
449
450
func TestLexer_LexesBlockStrings(t *testing.T) {
451
tests := []Test{
452
+ {
453
+ Body: `""""""`,
454
+ Expected: Token{
455
+ Kind: TokenKind[BLOCK_STRING],
456
+ Start: 0,
457
+ End: 6,
458
+ Value: "",
459
+ },
460
461
{
462
Body: `"""simple"""`,
463
Expected: Token{
0 commit comments