Skip to content

Commit cbd34d5

Browse files
committed
Add option to set MaxBuf in html.Parse
1 parent 9617c63 commit cbd34d5

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

html/parse.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2366,6 +2366,13 @@ func ParseOptionEnableScripting(enable bool) ParseOption {
23662366
}
23672367
}
23682368

2369+
// ParseOptionSetTokenizerMaxBuf sets the maximum buffer size for the tokenizer.
2370+
func ParseOptionSetTokenizerMaxBuf(maxBuf int) ParseOption {
2371+
return func(p *parser) {
2372+
p.tokenizer.SetMaxBuf(maxBuf)
2373+
}
2374+
}
2375+
23692376
// ParseWithOptions is like Parse, with options.
23702377
func ParseWithOptions(r io.Reader, opts ...ParseOption) (*Node, error) {
23712378
p := &parser{

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy