JavaScript Highlighter: Fix array whitespace

This commit is contained in:
Shadowfacts 2020-04-04 10:15:50 -04:00
부모 a976cf894f
커밋 1b0d261d54
로그인 계정: shadowfacts
GPG 키 ID: 94A5AB95422746E5
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제

파일 보기

@ -289,7 +289,7 @@ class JavaScriptHighlighter {
indent += " "
array:
while currentIndex < text.endIndex && peek() != "]" {
print("Array element")
consumeWhitespace()
while currentIndex < text.endIndex {
if peek() == "," {
consume() // ,
@ -300,6 +300,7 @@ class JavaScriptHighlighter {
break array
} else {
indent += " "
print("Array element")
consumeExpression()
indent = String(indent.dropLast(2))
}