From 7af87ebb81d9ee3d5eed183a2e65748ba12853c4 Mon Sep 17 00:00:00 2001 From: Gungun974 Date: Mon, 13 Nov 2023 20:30:14 +0400 Subject: [PATCH] refactor: change max size of element name to 128 (#297) --- parser/v2/elementparser.go | 4 ++-- parser/v2/elementparser_test.go | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/parser/v2/elementparser.go b/parser/v2/elementparser.go index 290c601e9..6a10932bf 100644 --- a/parser/v2/elementparser.go +++ b/parser/v2/elementparser.go @@ -313,9 +313,9 @@ var ( in.Seek(start) return } - if len(suffix)+1 > 32 { + if len(suffix)+1 > 128 { ok = false - err = parse.Error("element names must be < 32 characters long", in.Position()) + err = parse.Error("element names must be < 128 characters long", in.Position()) return } return prefix + suffix, true, nil diff --git a/parser/v2/elementparser_test.go b/parser/v2/elementparser_test.go index 54126b920..8966fa934 100644 --- a/parser/v2/elementparser_test.go +++ b/parser/v2/elementparser_test.go @@ -956,13 +956,13 @@ func TestElementParserErrors(t *testing.T) { }), }, { - name: "element: names cannot be greater than 32 characters", - input: ``, - expected: parse.Error("element names must be < 32 characters long", + name: "element: names cannot be greater than 128 characters", + input: ``, + expected: parse.Error("element names must be < 128 characters long", parse.Position{ - Index: 34, + Index: 130, Line: 0, - Col: 34, + Col: 130, }), }, }