Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensures whitespace inside text in list pops isn't duplicated #210

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion internal/dmapi/dmmap/dmmdata/parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@
currDatum = append(currDatum, c)
}
}
if inVarDataBlock { // retain any whitespace in the data block
else if inVarDataBlock { // retain any whitespace in the data block

Check failure on line 114 in internal/dmapi/dmmap/dmmdata/parse.go

View workflow job for this annotation

GitHub Actions / Lint Source Code

syntax error: unexpected else, expected }

Check failure on line 114 in internal/dmapi/dmmap/dmmdata/parse.go

View workflow job for this annotation

GitHub Actions / Lint Source Code

syntax error: unexpected else, expected }

Check failure on line 114 in internal/dmapi/dmmap/dmmdata/parse.go

View workflow job for this annotation

GitHub Actions / Lint Source Code

syntax error: unexpected else, expected }

Check failure on line 114 in internal/dmapi/dmmap/dmmdata/parse.go

View workflow job for this annotation

GitHub Actions / Build - ubuntu-22.04

syntax error: unexpected else, expected }

Check failure on line 114 in internal/dmapi/dmmap/dmmdata/parse.go

View workflow job for this annotation

GitHub Actions / Build - windows-2019

syntax error: unexpected else, expected }

Check failure on line 114 in internal/dmapi/dmmap/dmmdata/parse.go

View workflow job for this annotation

GitHub Actions / Build - macos-11

syntax error: unexpected else, expected }
currDatum = append(currDatum, c)
}
continue
Expand Down Expand Up @@ -253,7 +253,7 @@
}
)

for {

Check failure on line 256 in internal/dmapi/dmmap/dmmdata/parse.go

View workflow job for this annotation

GitHub Actions / Lint Source Code

syntax error: non-declaration statement outside function body) (typecheck)

Check failure on line 256 in internal/dmapi/dmmap/dmmdata/parse.go

View workflow job for this annotation

GitHub Actions / Lint Source Code

syntax error: non-declaration statement outside function body) (typecheck)

Check failure on line 256 in internal/dmapi/dmmap/dmmdata/parse.go

View workflow job for this annotation

GitHub Actions / Lint Source Code

syntax error: non-declaration statement outside function body) (typecheck)

Check failure on line 256 in internal/dmapi/dmmap/dmmdata/parse.go

View workflow job for this annotation

GitHub Actions / Build - ubuntu-22.04

syntax error: non-declaration statement outside function body

Check failure on line 256 in internal/dmapi/dmmap/dmmdata/parse.go

View workflow job for this annotation

GitHub Actions / Build - windows-2019

syntax error: non-declaration statement outside function body

Check failure on line 256 in internal/dmapi/dmmap/dmmdata/parse.go

View workflow job for this annotation

GitHub Actions / Build - macos-11

syntax error: non-declaration statement outside function body
if c, _, err := r.ReadRune(); err != nil {
if errors.Is(err, io.EOF) {
break
Expand Down
4 changes: 2 additions & 2 deletions internal/dmapi/dmmap/dmmdata/parse_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ no_ws=1;
} , /obj/foo2 ,
/obj/foo1 {no_ws=1} ,
/obj/foo3{
liz = list("a" = 2, "c" = 3)
liz = list("a" = 2, "c" = 3, "long bit of text " = "other long bit of text")
})

// Comment line that shouldn't flag TGM format
Expand Down Expand Up @@ -248,7 +248,7 @@ no_ws=1;

assert.Equal("/obj/foo3", prefabs[3].Path())
assert.ElementsMatch(prefabs[3].Vars().Iterate(), []string{"liz"})
assert.Equal("list(\"a\" = 2, \"c\" = 3)", prefabs[3].Vars().ValueV("liz", ""))
assert.Equal("list(\"a\" = 2, \"c\" = 3, \"long bit of text \" = \"other long bit of text\")", prefabs[3].Vars().ValueV("liz", ""))
}

// Table-based test to check failure edge cases.
Expand Down
Loading