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 c3f6d23
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 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
6 changes: 3 additions & 3 deletions parser/v2/elementparser_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -956,9 +956,9 @@ 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,
Line: 0,
Expand Down

0 comments on commit c3f6d23

Please sign in to comment.