diff --git a/go.mod b/go.mod index 0c432f7b4..48e922a62 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.16 require ( github.com/PuerkitoBio/goquery v1.7.1 - github.com/a-h/lexical v0.0.47 + github.com/a-h/lexical v0.0.50 github.com/a-h/pathvars v0.0.0-20200320143331-78b263b728e2 github.com/google/go-cmp v0.5.6 github.com/hashicorp/errwrap v1.1.0 // indirect @@ -16,7 +16,7 @@ require ( go.uber.org/atomic v1.8.0 // indirect go.uber.org/multierr v1.7.0 // indirect go.uber.org/zap v1.17.0 - golang.org/x/mod v0.5.1 // indirect + golang.org/x/mod v0.5.1 ) //replace github.com/a-h/lexical => /Users/adrian/github.com/a-h/lexical diff --git a/go.sum b/go.sum index d886b74bb..e18c9f81d 100644 --- a/go.sum +++ b/go.sum @@ -1,7 +1,11 @@ github.com/PuerkitoBio/goquery v1.7.1 h1:oE+T06D+1T7LNrn91B4aERsRIeCLJ/oPSa6xB9FPnz4= github.com/PuerkitoBio/goquery v1.7.1/go.mod h1:XY0pP4kfraEmmV1O7Uf6XyjoslwsneBbgeDjLYuN8xY= -github.com/a-h/lexical v0.0.47 h1:8VshFdJrb1wnDiA1bFqoxPhXsxpMqPFAsLcwLNQ8rq4= -github.com/a-h/lexical v0.0.47/go.mod h1:d73jw5cgKXuYypRozNBuxRNFrTWQ3y5hVMG7rUjh1Qw= +github.com/a-h/lexical v0.0.48 h1:vliyXGKMmEUP2hg8m+zq2vyE04iYNWvq1V3hH2QSdcE= +github.com/a-h/lexical v0.0.48/go.mod h1:d73jw5cgKXuYypRozNBuxRNFrTWQ3y5hVMG7rUjh1Qw= +github.com/a-h/lexical v0.0.49 h1:TRnSxSI7M7zAz/R5DFjL9kbX3tQgQ6BsvXe3VwpMtw0= +github.com/a-h/lexical v0.0.49/go.mod h1:d73jw5cgKXuYypRozNBuxRNFrTWQ3y5hVMG7rUjh1Qw= +github.com/a-h/lexical v0.0.50 h1:QGyK1vn51J3RyWgoMGdoObcCHcyqtEVBaGmQHCzhLog= +github.com/a-h/lexical v0.0.50/go.mod h1:d73jw5cgKXuYypRozNBuxRNFrTWQ3y5hVMG7rUjh1Qw= github.com/a-h/pathvars v0.0.0-20200320143331-78b263b728e2 h1:OObPWjEG3FZsjTNQPATyh8IpAvUfB6WpIO4mSzRSbRc= github.com/a-h/pathvars v0.0.0-20200320143331-78b263b728e2/go.mod h1:QulNSBbUWcOdt7MTypwParV0/gDtr8qRBmQAiDdOnS4= github.com/andybalholm/cascadia v1.2.0 h1:vuRCkM5Ozh/BfmsaTm26kbjm0mIOM3yS5Ek/F5h18aE= diff --git a/parser/doctypeparser_test.go b/parser/doctypeparser_test.go index 84570edcf..bb12e6e41 100644 --- a/parser/doctypeparser_test.go +++ b/parser/doctypeparser_test.go @@ -76,9 +76,9 @@ func TestDocTypeParserErrors(t *testing.T) { Col: 0, }, Position{ - Index: 17, + Index: 15, Line: 1, - Col: 17, + Col: 14, }), }, { diff --git a/parser/elementparser_test.go b/parser/elementparser_test.go index ca9bb1538..4e8646b68 100644 --- a/parser/elementparser_test.go +++ b/parser/elementparser_test.go @@ -1,6 +1,7 @@ package parser import ( + "strings" "testing" "github.com/a-h/lexical/input" @@ -575,3 +576,19 @@ func TestElementParserErrors(t *testing.T) { }) } } + +func TestBigElement(t *testing.T) { + var sb strings.Builder + sb.WriteString("