mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-15 20:44:01 +02:00
parser/pageparser: Add a benchmark
This commit is contained in:
@@ -41,10 +41,13 @@ func Parse(r io.Reader) (Result, error) {
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "failed to read page content")
|
||||
}
|
||||
return parseBytes(b)
|
||||
}
|
||||
|
||||
func parseBytes(b []byte) (Result, error) {
|
||||
lexer := newPageLexer(b, 0, lexIntroSection)
|
||||
lexer.run()
|
||||
return lexer, nil
|
||||
|
||||
}
|
||||
|
||||
func parseMainSection(input []byte, from int) Result {
|
||||
|
Reference in New Issue
Block a user