Skip to content

Commit

Permalink
Changing the maximum size of an element name to 64
Browse files Browse the repository at this point in the history
  • Loading branch information
gungun974 committed Nov 13, 2023
1 parent b511005 commit 4b13775
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions parser/v2/elementparser.go
Original file line number Diff line number Diff line change
Expand Up @@ -313,9 +313,9 @@ var (
in.Seek(start)
return
}
if len(suffix)+1 > 32 {
if len(suffix)+1 > 64 {
ok = false
err = parse.Error("element names must be < 32 characters long", in.Position())
err = parse.Error("element names must be < 64 characters long", in.Position())
return
}
return prefix + suffix, true, nil
Expand Down
10 changes: 5 additions & 5 deletions parser/v2/elementparser_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -956,13 +956,13 @@ func TestElementParserErrors(t *testing.T) {
}),
},
{
name: "element: names cannot be greater than 32 characters",
input: `<aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa></aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa>`,
expected: parse.Error("element names must be < 32 characters long",
name: "element: names cannot be greater than 64 characters",
input: `<aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa></aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa>`,
expected: parse.Error("element names must be < 64 characters long",
parse.Position{
Index: 34,
Index: 66,
Line: 0,
Col: 34,
Col: 66,
}),
},
}
Expand Down

0 comments on commit 4b13775

Please sign in to comment.