diff --git a/gno.land/pkg/gnoweb/app.go b/gno.land/pkg/gnoweb/app.go index 285c17d5605..502311784e8 100644 --- a/gno.land/pkg/gnoweb/app.go +++ b/gno.land/pkg/gnoweb/app.go @@ -96,7 +96,7 @@ func NewRouter(logger *slog.Logger, cfg *AppConfig) (http.Handler, error) { // Configure WebClient webcfg := HTMLWebClientConfig{ Markdown: md, - Highlighter: NewChromaHighlighterFormat(chroma, chromaDefaultStyle), + Highlighter: NewChromaSourceHighlighter(chroma, chromaDefaultStyle), Domain: cfg.Domain, UnsafeHTML: cfg.UnsafeHTML, RPCClient: client, diff --git a/gno.land/pkg/gnoweb/webclient_mock.go b/gno.land/pkg/gnoweb/webclient_mock.go index 6ff381abb83..261b0b02814 100644 --- a/gno.land/pkg/gnoweb/webclient_mock.go +++ b/gno.land/pkg/gnoweb/webclient_mock.go @@ -2,7 +2,6 @@ package gnoweb import ( "bytes" - "errors" "fmt" "io" "sort" @@ -49,7 +48,7 @@ func (m *MockWebClient) RenderRealm(w io.Writer, path string, args string) (*Rea func (m *MockWebClient) SourceFile(w io.Writer, pkgPath, fileName string) (*FileMeta, error) { pkg, exists := m.Packages[pkgPath] if !exists { - return nil, errors.New("package not found") + return nil, ErrClientPathNotFound } if body, ok := pkg.Files[fileName]; ok { @@ -60,14 +59,14 @@ func (m *MockWebClient) SourceFile(w io.Writer, pkgPath, fileName string) (*File }, nil } - return nil, errors.New("file not found") + return nil, ErrClientPathNotFound } // Functions simulates retrieving function signatures from a package. func (m *MockWebClient) Functions(path string) ([]vm.FunctionSignature, error) { pkg, exists := m.Packages[path] if !exists { - return nil, errors.New("package not found") + return nil, ErrClientPathNotFound } return pkg.Functions, nil @@ -77,7 +76,7 @@ func (m *MockWebClient) Functions(path string) ([]vm.FunctionSignature, error) { func (m *MockWebClient) Sources(path string) ([]string, error) { pkg, exists := m.Packages[path] if !exists { - return nil, errors.New("package not found") + return nil, ErrClientPathNotFound } fileNames := make([]string, 0, len(pkg.Files))